Marine Library
1.0
C++ library for Linux Networking Development
|
Data packing library using stream style interfaces. More...
Go to the source code of this file.
Classes | |
class | CInByteStream |
Data unpacking interfaces. More... | |
class | COutByteStreamBasic< Data > |
Data packing interfaces. More... | |
Namespaces | |
Manip | |
Manipulators for stream interface APIs. | |
Typedefs | |
typedef COutByteStreamBasic< NS_IMPL::__buf_data< std::string > > | COutByteStreamStr |
Use internal std::string as the underlying data buffer. More... | |
typedef COutByteStreamStr | COutByteStream |
Same as COutByteStreamStr. | |
typedef COutByteStreamBasic< NS_IMPL::__buf_ref_data< std::string > > | COutByteStreamStrRef |
Use external std::string as the underlying data buffer. More... | |
typedef COutByteStreamBasic< NS_IMPL::__buf_data< std::vector< char > > > | COutByteStreamVec |
Use internal std::vector<char> as the underlying data buffer. More... | |
typedef COutByteStreamBasic< NS_IMPL::__buf_ref_data< std::vector< char > > > | COutByteStreamVecRef |
Use external std::vector<char> as the underlying data buffer. More... | |
typedef COutByteStreamBasic< NS_IMPL::__buf_data< CCharBuffer< char > > > | COutByteStreamBuf |
Use external char array as the underlying data buffer. More... | |
Functions | |
template<class T > | |
NS_IMPL::CManipulatorProtobuf< T > | Manip::protobuf (T &msg, size_t size=size_t(-1)) |
Pack/unpack Protocol Buffers messages. More... | |
template<typename T > | |
NS_IMPL::CManipulatorVarint< const T > | Manip::varint (const T &val) |
Pack integer using Base 128 Varints encoding. More... | |
template<typename T > | |
NS_IMPL::CManipulatorVarint< T > | Manip::varint (T &val) |
Unpack integer using Base 128 Varints encoding. More... | |
NS_IMPL::CManipulatorStubPush | Manip::stub (size_t sz) |
Set up a stub. More... | |
NS_IMPL::CManipulatorStubPop | Manip::stub_pop (bool align=false, bool check=false) |
Demolish the top most stub. More... | |
Mapip::raw | |
Pack/unpack a range of elements, without leading size field.
| |
template<class T , size_t N> | |
NS_IMPL::CManipulatorRawPtr< T > | Manip::raw (T(&c)[N]) |
template<class T > | |
NS_IMPL::CManipulatorRawPtr< T > | Manip::raw (T *c, size_t sz) |
template<class T > | |
NS_IMPL::CManipulatorRawPtr< T > | Manip::raw (std::vector< T > &c, size_t sz) |
template<class T > | |
NS_IMPL::CManipulatorRawPtr< const T > | Manip::raw (const std::vector< T > &c, size_t *sz=NULL) |
template<typename Char > | |
NS_IMPL::CManipulatorRawPtr< Char > | Manip::raw (std::basic_string< Char > &c, size_t len) |
template<typename Char > | |
NS_IMPL::CManipulatorRawPtr< const Char > | Manip::raw (const std::basic_string< Char > &c, size_t *sz=NULL) |
template<class ForwardIter > | |
NS_IMPL::CManipulatorRawRange< ForwardIter > | Manip::raw (ForwardIter first, ForwardIter last, size_t *sz=NULL) |
template<class T > | |
NS_IMPL::CManipulatorRawCont< T > | Manip::raw (T &c, size_t sz) |
template<class T > | |
NS_IMPL::CManipulatorRawCont< const T > | Manip::raw (const T &c, size_t *sz=NULL) |
Mapip::array | |
Pack/unpack a range of elements, with leading size field.
| |
template<typename LenT , class T , size_t N> | |
NS_IMPL::CManipulatorArrayPtr< LenT, T > | Manip::array (T(&c)[N], LenT *real_sz) |
template<typename LenT , class T , size_t N> | |
NS_IMPL::CManipulatorArrayPtr< LenT, const T > | Manip::array (const T(&c)[N]) |
template<typename LenT , class T > | |
NS_IMPL::CManipulatorArrayPtr< LenT, T > | Manip::array (T *c, size_t sz, LenT *real_sz) |
template<typename LenT , class T > | |
NS_IMPL::CManipulatorArrayPtr< LenT, const T > | Manip::array (const T *c, size_t sz) |
template<typename LenT , class T > | |
NS_IMPL::CManipulatorArrayCont< LenT, T > | Manip::array (T &c, LenT max_size=0) |
template<typename LenT , class T > | |
NS_IMPL::CManipulatorArrayCont< LenT, const T > | Manip::array (const T &c) |
template<class T > | |
NS_IMPL::CManipulatorArrayCont< uint16_t, T > | Manip::array (T &c, uint16_t max_size=0) |
template<class T > | |
NS_IMPL::CManipulatorArrayCont< uint16_t, const T > | Manip::array (const T &c) |
template<typename LenT , class ForwardIter > | |
NS_IMPL::CManipulatorArrayRange< LenT, ForwardIter > | Manip::array (ForwardIter first, ForwardIter last, LenT *sz=NULL) |
Byte order | |
APIs for changing CInByteStream / COutByteStreamBasic object's byte order, both permanently and temporarily.
| |
void | Manip::net_order (NS_IMPL::CDataStreamBase &ds) |
void | Manip::host_order (NS_IMPL::CDataStreamBase &ds) |
void | Manip::little_endian (NS_IMPL::CDataStreamBase &ds) |
void | Manip::big_endian (NS_IMPL::CDataStreamBase &ds) |
template<class T > | |
NS_IMPL::CManipulatorValueByteOrder< T > | Manip::net_order_value (T &val) |
template<class T > | |
NS_IMPL::CManipulatorValueByteOrder< const T > | Manip::net_order_value (const T &val) |
template<class T > | |
NS_IMPL::CManipulatorValueByteOrder< T > | Manip::host_order_value (T &val) |
template<class T > | |
NS_IMPL::CManipulatorValueByteOrder< const T > | Manip::host_order_value (const T &val) |
template<class T > | |
NS_IMPL::CManipulatorValueByteOrder< T > | Manip::little_endian_value (T &val) |
template<class T > | |
NS_IMPL::CManipulatorValueByteOrder< const T > | Manip::little_endian_value (const T &val) |
template<class T > | |
NS_IMPL::CManipulatorValueByteOrder< T > | Manip::big_endian_value (T &val) |
template<class T > | |
NS_IMPL::CManipulatorValueByteOrder< const T > | Manip::big_endian_value (const T &val) |
Current position | |
APIs for changing current position, both permanently and temporarily.
| |
NS_IMPL::CManipulatorSeek | Manip::seek (size_t pos) |
NS_IMPL::CManipulatorSkip | Manip::skip (ssize_t off) |
NS_IMPL::CManipulatorSkipFill | Manip::skip (ssize_t off, int fill) |
template<typename T > | |
NS_IMPL::CManipulatorSkipPtr< T > | Manip::skip (T *off) |
template<typename T > | |
NS_IMPL::CManipulatorSkipPtrFill< T > | Manip::skip (T *off, int fill) |
template<class T > | |
NS_IMPL::CManipulatorOffsetValue< T > | Manip::offset_value (size_t pos, T &val) |
template<class T > | |
NS_IMPL::CManipulatorOffsetValue< const T > | Manip::offset_value (size_t pos, const T &val) |
template<class T > | |
NS_IMPL::CManipulatorInsert< T > | Manip::insert (size_t pos, const T &val) |
Manip::end | |
End packing/unpacking operations. When all packing/unpacking operations finish, it's a good practice to announce an
| |
NS_IMPL::CManipulatorEnd< void, void > | Manip::end () |
End operations for CInByteStream, COutByteStreamStrRef, COutByteStreamVecRef. More... | |
template<typename SizeT > | |
NS_IMPL::CManipulatorEnd< SizeT *, void > | Manip::end (SizeT *sz) |
End operations for COutByteStreamBuf, COutByteStreamStrRef, COutByteStreamVecRef. More... | |
template<class BufT > | |
NS_IMPL::CManipulatorEnd< BufT, void > | Manip::end (BufT &buf) |
End operations for COutByteStream / COutByteStreamStr, COutByteStreamStrRef, COutByteStreamVec, COutByteStreamVecRef. More... | |
template<typename CharT > | |
NS_IMPL::CManipulatorEnd< CharT *, size_t * > | Manip::end (CharT *buf, size_t *sz) |
End operations for COutByteStream / COutByteStreamStr, COutByteStreamStrRef, COutByteStreamVec, COutByteStreamVecRef, COutByteStreamBuf. More... | |
Data packing library using stream style interfaces.
typedef COutByteStreamBasic<NS_IMPL::__buf_data<CCharBuffer<char> > > COutByteStreamBuf |
Use external char
array as the underlying data buffer.
typedef COutByteStreamBasic<NS_IMPL::__buf_data<std::string> > COutByteStreamStr |
Use internal std::string
as the underlying data buffer.
typedef COutByteStreamBasic<NS_IMPL::__buf_ref_data<std::string> > COutByteStreamStrRef |
Use external std::string
as the underlying data buffer.
typedef COutByteStreamBasic<NS_IMPL::__buf_data<std::vector<char> > > COutByteStreamVec |
Use internal std::vector<char>
as the underlying data buffer.
typedef COutByteStreamBasic<NS_IMPL::__buf_ref_data<std::vector<char> > > COutByteStreamVecRef |
Use external std::vector<char>
as the underlying data buffer.