#include <source/ariba/utility/transport/tcpip/protlib/ie.h>
Public Types | |
enum | coding_t { nslp_v1 = 1, protocol_v1 = 1, protocol_v2 = 2, nslp_v2 = 3, nslp_v2_yoda = 4 } |
IE coding sheme. More... | |
Public Member Functions | |
virtual | ~IE () |
virtual IE * | new_instance () const =0 |
get a new instance of the IE | |
virtual IE * | copy () const =0 |
copy an IE | |
virtual IE * | deserialize (NetMsg &msg, coding_t coding, IEErrorList &errorlist, uint32 &bread, bool skip=true)=0 |
deserialization | |
virtual void | serialize (NetMsg &msg, coding_t coding, uint32 &wbytes) const =0 |
serialize | |
virtual bool | check () const =0 |
IE consistency check. | |
virtual bool | supports_coding (coding_t c) const =0 |
check if IE supports coding sheme | |
virtual size_t | get_serialized_size (coding_t coding) const =0 |
IE serialized size. | |
uint16 | get_category () const |
get category | |
virtual bool | operator== (const IE &ie) const =0 |
equality | |
bool | operator!= (const IE &ie) const |
not equal | |
virtual const char * | get_ie_name () const =0 |
get IE name | |
virtual ostream & | print (ostream &os, uint32 level, const uint32 indent, const char *name=NULL) const |
print to a ostream | |
string | to_string (const char *name=0) const |
get a string representing the IE content | |
virtual istream & | input (istream &is, bool istty, uint32 level, const uint32 indent, const char *name=NULL) |
input from an istream | |
virtual void | clear_pointers () |
clear all pointer fields | |
Protected Member Functions | |
IE (uint16 category) | |
contructor | |
IE (const IE &n) | |
copy constructor | |
bool | check_deser_args (coding_t cod, IEErrorList &errorlist, uint32 &bread) const |
check arguments for deserialization | |
void | check_ser_args (coding_t cod, uint32 &wbytes) const |
check arguments for serialization | |
virtual void | register_ie (IEManager *iem) const =0 |
register this IE | |
void | throw_nomem_error () const |
throw a NO_MEM exception | |
Protected Attributes | |
const uint16 | category |
IE category. | |
Friends | |
class | IEManager |
Definition at line 74 of file ie.h.
IE coding sheme.
All coding shemes have to be listed here. Each IE should support at least one listed coding sheme. This is used when serializing or deserializing from a NetMsg object to (de)code the IE in the right way. Note that coding schemes and protocol version are not the same. There could also be a coding sheme to (de)code IEs e.g. for router configuration.
virtual bool protlib::IE::check | ( | ) | const [pure virtual] |
virtual IE* protlib::IE::copy | ( | ) | const [pure virtual] |
virtual IE* protlib::IE::deserialize | ( | NetMsg & | msg, | |
coding_t | coding, | |||
IEErrorList & | errorlist, | |||
uint32 & | bread, | |||
bool | skip = true | |||
) | [pure virtual] |
deserialization
virtual const char* protlib::IE::get_ie_name | ( | ) | const [pure virtual] |
get IE name
This is mainly for error reporting.
Referenced by check_deser_args(), check_ser_args(), input(), print(), protlib::IEManager::register_ie(), and throw_nomem_error().
virtual size_t protlib::IE::get_serialized_size | ( | coding_t | coding | ) | const [pure virtual] |
IE serialized size.
bool protlib::IE::operator!= | ( | const IE & | ie | ) | const [inline] |
virtual bool protlib::IE::operator== | ( | const IE & | ie | ) | const [pure virtual] |
equality
virtual void protlib::IE::register_ie | ( | IEManager * | iem | ) | const [protected, pure virtual] |
virtual bool protlib::IE::supports_coding | ( | coding_t | c | ) | const [pure virtual] |
const uint16 protlib::IE::category [protected] |