|
LibUDB 1.0
|
The UDBElement class. More...
#include <UDBElement.h>
Public Member Functions | |
| UDBElement (const UDBElement &other) | |
| UDBElement (UDBElement &&other) | |
| UDBElement & | operator= (const UDBElement &other) |
| operator = | |
| UDBElement & | operator= (UDBElement &&other) |
| operator = | |
| bool | operator== (const UDBElement &other) const |
| operator == | |
| bool | operator!= (const UDBElement &other) const |
| operator != | |
| void | writeToBuffer (std::vector< char > &buf) |
| size_t | readFromBuffer (const std::vector< char > &buf, const size_t &start_pos) |
| size_t | calculateWriteSize () |
| void | shrinkToFit () |
Public Attributes | |
| std::string | id |
| Elements identification value (if any). | |
| std::string | content |
| Elements content (if any). | |
| std::vector< UDBElement > | subelements |
| Elements subelement (if any). | |
The UDBElement class.
This class is suitable for database elements keeping.
| UDBElement::UDBElement | ( | const UDBElement & | other | ) |
Copy constructor.
| other | UDBElement to be copied. |
| UDBElement::UDBElement | ( | UDBElement && | other | ) |
Move constructor.
| other | UDBElement to be moved. |
| size_t UDBElement::calculateWriteSize | ( | ) |
Calculates quantity of bytes will be written by writeToBuffer() method.
| bool UDBElement::operator!= | ( | const UDBElement & | other | ) | const |
operator !=
| other | UDBElement to be compared. |
| UDBElement & UDBElement::operator= | ( | const UDBElement & | other | ) |
| UDBElement & UDBElement::operator= | ( | UDBElement && | other | ) |
| bool UDBElement::operator== | ( | const UDBElement & | other | ) | const |
operator ==
| other | UDBElement to be compared. |
| size_t UDBElement::readFromBuffer | ( | const std::vector< char > & | buf, |
| const size_t & | start_pos ) |
Tries to read UDBElement from buffer.
| buf | Buffer UDBElement should be read from. |
| start_pos | Offset of first byte to be read. |
| void UDBElement::shrinkToFit | ( | ) |
Reduces memory usage by freeing unused memory in internal containers.
| void UDBElement::writeToBuffer | ( | std::vector< char > & | buf | ) |
Writes this UDBElement to buffer buf.
| buf | Buffer UDBElement should be written to. |