~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/include/encoding.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#ifndef CEPH_ENCODING_H
16
16
#define CEPH_ENCODING_H
17
17
 
 
18
#include <tr1/memory>
 
19
 
18
20
#include "inttypes.h"
19
21
#include "byteorder.h"
20
22
#include "buffer.h"
 
23
#include "assert.h"
21
24
 
22
25
using namespace ceph;
23
26
 
24
 
#include <tr1/memory>
25
 
 
26
27
/*
27
28
 * Notes on feature encoding:
28
29
 *
58
59
 
59
60
#define WRITE_RAW_ENCODER(type)                                         \
60
61
  inline void encode(const type &v, bufferlist& bl, uint64_t features=0) { encode_raw(v, bl); } \
61
 
  inline void decode(type &v, bufferlist::iterator& p) { decode_raw(v, p); }
 
62
  inline void decode(type &v, bufferlist::iterator& p) { __ASSERT_FUNCTION decode_raw(v, p); }
62
63
 
63
64
WRITE_RAW_ENCODER(__u8)
64
65
WRITE_RAW_ENCODER(__s8)
794
795
#define DECODE_START_LEGACY_COMPAT_LEN_32(v, compatv, lenv, bl)         \
795
796
  __DECODE_START_LEGACY_COMPAT_LEN(v, compatv, lenv, 3, bl)
796
797
 
 
798
#define DECODE_START_LEGACY_COMPAT_LEN_16(v, compatv, lenv, bl)         \
 
799
  __DECODE_START_LEGACY_COMPAT_LEN(v, compatv, lenv, 1, bl)
 
800
 
797
801
/**
798
802
 * finish decode block
799
803
 *