#include <cOptionalPart.h>
List of all members.
Detailed Description
Definition at line 65 of file cOptionalPart.h.
Constructor & Destructor Documentation
fib::cOptionalPart::cOptionalPart |
( |
| ) |
|
|
protected |
The constructor for the optionalpart.
virtual fib::cOptionalPart::~cOptionalPart |
( |
| ) |
|
|
protectedvirtual |
The destructor for the optionalpart.
Member Function Documentation
virtual bool fib::cOptionalPart::actualizeCompressData |
( |
| ) |
const |
|
protectedvirtual |
This method ads the given key szKey and value szValue pair to the optionalpart list.
- Parameters:
-
szKey | the key of the entry to add |
szValue | the value of the entry to add |
ulPosition | the position on which in the optional part list the new entry should be added (counting begins with 1); the standardvalue is 0 to add the entry on the end of the list |
- Returns:
- the position wher the new entry was added to the optional part list (counting begins with 1)
This Method clones this object.
- Returns:
- a clone of this object
unsignedLongFib fib::cOptionalPart::deleteEntries |
( |
string |
szKey, |
|
|
bool |
bFullBegin = true |
|
) |
| |
This method deletes all entries which have the given key szKey as ther full key (if bFullBegin=true) or as the begining of ther key (if bFullBegin=false) .
- Parameters:
-
szKey | the key for which the entries are to delete |
bFullBegin | if true (the standardvalue) the given key szKey is the complete key to be found, else the key szKey is just the beginning of the key to be found |
- Returns:
- the number of deleted entries
This method deletes the ulEntryNumber'th entry of the optional part list.
- Parameters:
-
ulEntryNumber | the number of the entry in the optional list of the entry to delete (counting begins with 1) |
- Returns:
- true if the entry was deleted, else false
virtual bool fib::cOptionalPart::equal |
( |
const cOptionalPart & |
optionalPart | ) |
const |
|
virtual |
This Method checks if the given optionalpart is equal to this optionalpart. Two optionalpart are equal, if they have the same entries in the same order.
- Parameters:
-
optionalPart | the optionalpart to compare with this |
- Returns:
- true if the given optionalpart is equal to this optionalpart, else false
list< pair<string,string> > fib::cOptionalPart::findKeyPart |
( |
string |
szKeyPart | ) |
const |
This method returns all entries which have the given szKeyPart as an part of ther key.
- Parameters:
-
szKeyPart | the part of the keys for which the entries are to be return |
- Returns:
- a list with the key -value -pairs with szKeyPart as part of ther key; the returned pairs are an (key, value) -pairs
list< pair<string,string> > fib::cOptionalPart::getEntries |
( |
string |
szKey, |
|
|
bool |
bFullBegin = true |
|
) |
| const |
This method returns all entries which have the given key szKey as ther full key (if bFullBegin=true) or as the begining of ther key (if bFullBegin=false) .
- Parameters:
-
szKey | the key for which the entries are to return |
bFullBegin | if true (the standardvalue) the given key szKey is the complete key to be found, else the key szKey is just the beginning of the key to be found |
- Returns:
- a list with the key -value -pairs for the given key szKey; the returned pairs are an (key, value) -pairs
pair< string, string > fib::cOptionalPart::getEntry |
( |
unsignedLongFib |
ulEntryNumber | ) |
const |
This method returns the ulEntryNumber'th entry of the optional part list. If ther is no ulEntryNumber'th entry a pair with two empty strings is returend;
- Parameters:
-
ulEntryNumber | the number of the entry in the optional list of the entry to return (counting begins with 1) |
- Returns:
- the ulEntryNumber'th entry of the optional part list or a pair with to empty strings if an ulEntryNumber'th entry dosn't exists; the returned pair is an (key, value) -pair
- Returns:
- returns the number of entries in the optional part
virtual bool fib::cOptionalPart::operator== |
( |
const cOptionalPart & |
optionalPart | ) |
const |
|
virtual |
This Method checks if the given optionalpart is equal to this optionalpart. Two optionalpart are equal, if they have the same entries in the same order.
- Parameters:
-
optionalPart | the optionalpart to compare with this |
- Returns:
- true if the given optionalpart is equal to this optionalpart, else false
virtual intFib fib::cOptionalPart::restore |
( |
cReadBits & |
iBitStream, |
|
|
const unsigned long |
ulBytsToRead = 0 |
|
) |
| |
|
virtual |
This method restores the optionalpart from a bitstream, wher it is stored in the compressed fib-format with the set compression type.
- See also:
- store()
-
setCompressionType()
-
uiCompressionType
-
actualizeCompressData()
-
cFibElement::store()
- Parameters:
-
iBitStream | the stream where this optionalpart is stored to in, because this stream is an cReadBits, any number of bits can be readed from it |
ulBytsToRead | the nuber of byts the optional part is long, if 0 (defaultvalue) it will be read till the end of the stream is reached |
- Returns:
- the errorvalue possible errorvalues are:
- 0 loading successful
- -1 loading error, invalid stream
- -2 loading error, invalid data in stream
- 1 loading warning, invalid data in stream, error could be corrected
- 2 loading warning, invalid data in stream, maybe the loaded object is wrong
virtual intFib fib::cOptionalPart::restoreXml |
( |
const TiXmlElement * |
pXmlElement | ) |
|
|
virtual |
This method restores this optionalpart in the XML-format from an an TinyXml element.
- Parameters:
-
pXmlNode | a pointer to the TinyXml node wher the optionalpart is stored in |
- Returns:
- an integervalue with the errorvalue possible errorvalues are:
- 0 loading successful
- -1 loading error, invalid pXmlElement
- -2 loading error, invalid data in pXmlElement
- 1 loading warning, invalid data in pXmlElement, error could be corrected
- 2 loading warning, invalid data in pXmlElement, maybe the loaded object is wrong
virtual bool fib::cOptionalPart::setCompressionType |
( |
unsignedIntFib |
uiInCompressionType = 1 | ) |
|
|
virtual |
This method sets the compression type of the optional part for compressed storing. Possible typs are: 0: no compression 1: The data is compressed in the zlib format. This is a Warper (documented in RFC 1950) for a deflate stream (lossless data compression, documented in RFC 1951).
- See also:
- uiCompressionType
-
store()
-
restore()
-
getCompressedSize()
-
actualizeCompressData()
- Parameters:
-
uiInCompressionType | the compression type to set, standard value is 1 fo zlib compression |
- Returns:
- true if the compression type could be set
virtual bool fib::cOptionalPart::store |
( |
ostream & |
stream | ) |
const |
|
virtual |
virtual bool fib::cOptionalPart::storeXml |
( |
ostream & |
ostream | ) |
const |
|
virtual |
This method stores this optionalpart in the XML -format into the given stream. example: <optionalpart> <pair key="copyright" value="GNU GPL 3"> <pair key="type" value="die Berliner Mauer"> </optionalpart>
- Parameters:
-
ostream | the stream where this optionalpart should be stored to |
- Returns:
- true if this optionalpart is stored, else false
Friends And Related Function Documentation
Member Data Documentation
list< pair<string,string> > fib::cOptionalPart::optionalInformation |
|
protected |
the list with the key -value -pairs of optional information
Definition at line 75 of file cOptionalPart.h.
char* fib::cOptionalPart::pCompressedData |
|
mutableprotected |
size_t fib::cOptionalPart::uiCompressedDataSize |
|
mutableprotected |
The type of the compression. Possible typs are: 0: no compression 1: The data is compressed in the zlib format. This is a Warper (documented in RFC 1950) for a deflate stream (lossless data compression, documented in RFC 1951).
Definition at line 92 of file cOptionalPart.h.
unsigned long fib::cOptionalPart::ulCompressedDataVersion |
|
mutableprotected |
unsigned long fib::cOptionalPart::ulVersion |
|
protected |
This number will be increased with each update. With it, it can be checked if this optional part is changed.
Definition at line 82 of file cOptionalPart.h.
The documentation for this class was generated from the following file: