Jpp
|
Data structure of a ControlHost message. More...
Public Types | |
typedef JMalloc< char > | JMemory_t |
Public Member Functions | |
JDispatch () | |
Default constructor. More... | |
JDispatch (const JPrefix_t &prefix, const char *data) | |
Constructor. More... | |
JDispatch (const JTag &tag, const std::string &message) | |
Constructor. More... | |
JDispatch (const JDispatch &message) | |
Copy constructor. More... | |
~JDispatch () | |
Destructor. More... | |
JDispatch & | operator= (const JDispatch &message) |
Assignment operator. More... | |
operator JSocketOutputBuffer () const | |
Type conversion operator. More... | |
int | size () const |
Get size. More... | |
const char * | data () const |
Get data. More... | |
int | getSize () const |
Get size. More... | |
void | setSize (const int length) |
Set size. More... | |
void | set (const JTag &tag, const int length) |
Set prefix. More... | |
const JTag & | getTag () const |
Get tag. More... | |
JTag & | getTag () |
Get tag. More... | |
void | setTag (const JTag &tag) |
Set tag. More... | |
void | setTag (const std::string &tag) |
Set tag. More... | |
JTag_t | getID () const |
Get identifier. More... | |
bool | setID (const JTag_t id) |
Set identifier. More... | |
std::string | toString () const |
Convert tag to string. More... | |
operator std::string () const | |
Type conversion operators. More... | |
const char * | c_str () const |
C-string. More... | |
const char | operator[] (int i) const |
Get character. More... | |
void | initialise () |
Initialise counter. More... | |
void | attach (const JSharedCounter &object) |
Attach this counter to given shared counter object. More... | |
bool | detach () |
Detach. More... | |
Static Public Attributes | |
static long long int | MEMORY_TOTAL = 0 |
Total size of data [Bytes]. More... | |
static long long int | MEMORY_LIMIT |
Limit size of data [Bytes]. More... | |
Protected Member Functions | |
void | create () |
Allocate memory. More... | |
void | release () |
Release memory. More... | |
Protected Attributes | |
char * | buffer |
int | size |
union { | |
char tag [TAGSIZE] | |
JTag_t id | |
}; | |
int * | counter |
Data structure of a ControlHost message.
This data structure consists of a copy of the ControlHost prefix and an array of bytes (including the ControlHost prefix). A new array of bytes is created by the appropriate constructor. The allocated memory is released upon destruction of the last object of this class.
Definition at line 63 of file JLigier.cc.
typedef JMalloc<char> JNET::JDispatch::JMemory_t |
Definition at line 69 of file JLigier.cc.
|
inline |
|
inline |
Constructor.
Note that the input data should contain a copy of the prefix.
prefix | prefix |
data | data |
Definition at line 91 of file JLigier.cc.
|
inline |
Constructor.
Note that the given message is appended to a copy of the prefix.
tag | tag |
message | message |
Definition at line 109 of file JLigier.cc.
|
inline |
|
inline |
Assignment operator.
message | message |
Definition at line 153 of file JLigier.cc.
|
inline |
Type conversion operator.
Definition at line 175 of file JLigier.cc.
|
inline |
Get size.
Definition at line 186 of file JLigier.cc.
|
inline |
|
inlineprotected |
Allocate memory.
Definition at line 207 of file JLigier.cc.
|
inlineprotected |
Release memory.
Definition at line 227 of file JLigier.cc.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Set prefix.
tag | tag |
length | number of bytes |
Definition at line 87 of file JPrefix.hh.
|
inlineinherited |
|
inlineinherited |
Get tag.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get identifier.
|
inlineinherited |
Set identifier.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
C-string.
|
inlineinherited |
Get character.
i | index |
|
inlineinherited |
Initialise counter.
Definition at line 32 of file JSharedCounter.hh.
|
inlineinherited |
Attach this counter to given shared counter object.
object | shared counter |
Definition at line 45 of file JSharedCounter.hh.
|
inlineinherited |
|
static |
|
static |
|
protected |
Definition at line 234 of file JLigier.cc.
|
protectedinherited |
Definition at line 95 of file JPrefix.hh.
union { ... } |
|
protectedinherited |
Definition at line 82 of file JSharedCounter.hh.