#include <ot_lib.h>
Public Member Functions | |
ot_map (void) | |
ot_map (const ot_map &c) | |
virtual | ~ot_map () |
Destructor. | |
ot_obj * | dup (void) const |
void | asXml (ostream &s=cout, int i=0) const |
bool | asData (ostream &s) const |
const ot_obj * | get (const string &pos) const |
Get the element at position pos (0..Size-1). | |
ot_obj * | getPtr (const string &pos) |
Get the element at position pos (0..Size-1). | |
bool | insert (const string &pos, const ot_obj *o) |
Insert an ot_object into the array. | |
bool | insert (const string &pos, const ot_obj &o) |
Insert an ot_object into the array. | |
bool | insertPtr (const string &pos, ot_obj *o) |
bool | erase (const ot_obj *o) |
Erase an object from the array. | |
bool | erase (const string &o) |
Erase an object from the array. | |
ot_map & | operator= (const ot_map &c) |
Assign op. | |
bool | operator== (const ot_map &c) |
Eq op. | |
bool | operator!= (const ot_map &v) |
Operator !=. | |
bool | operator== (const ot_obj *o) const |
Eq op. | |
Private Member Functions | |
void | clearAll (void) |
void | copyFrom (const ot_map &c) |
This class implement a map of OT objects.
ot_lib::ot_map::ot_map | ( | void | ) |
size | size of the array |
ot_lib::ot_map::ot_map | ( | const ot_map & | c | ) |
Copy constructor
c | Object to copy |
virtual ot_lib::ot_map::~ot_map | ( | ) | [virtual] |
Destructor.
void ot_lib::ot_map::clearAll | ( | void | ) | [private] |
void ot_lib::ot_map::copyFrom | ( | const ot_map & | c | ) | [private] |
ot_obj* ot_lib::ot_map::dup | ( | void | ) | const [virtual] |
Duplicate the object Clone the array and all the objects contained.
Implements ot_lib::ot_obj.
void ot_lib::ot_map::asXml | ( | ostream & | s = cout , |
|
int | i = 0 | |||
) | const [virtual] |
Print the XML rappresentation of object into string
s | the output string | |
i | The indent spaces |
Implements ot_lib::ot_obj.
bool ot_lib::ot_map::asData | ( | ostream & | s | ) | const [virtual] |
const ot_obj* ot_lib::ot_map::get | ( | const string & | pos | ) | const |
Get the element at position pos (0..Size-1).
Return the pointer to the object at the postion pos.
pos | The object position in the array (0..Size-1) |
ot_obj* ot_lib::ot_map::getPtr | ( | const string & | pos | ) |
Get the element at position pos (0..Size-1).
Return the pointer to the object at the postion pos.
pos | The object position in the array (0..Size-1) |
bool ot_lib::ot_map::insert | ( | const string & | pos, | |
const ot_obj * | o | |||
) |
Insert an ot_object into the array.
This function make the copy of the input object and then insert it in the array.
pos | The object position in array (0..Size-1) | |
o | The object to insert |
bool ot_lib::ot_map::insert | ( | const string & | pos, | |
const ot_obj & | o | |||
) |
Insert an ot_object into the array.
This function make the copy of the input object and then insert it in the array.
pos | The object position in array (0..Size-1) | |
o | The object to insert |
bool ot_lib::ot_map::insertPtr | ( | const string & | pos, | |
ot_obj * | o | |||
) |
bool ot_lib::ot_map::erase | ( | const ot_obj * | o | ) |
Erase an object from the array.
Erase an obect from the array
o | The object to erase |
bool ot_lib::ot_map::erase | ( | const string & | o | ) |
Erase an object from the array.
Erase an obect from the array
o | The object to erase |
bool ot_lib::ot_map::operator== | ( | const ot_map & | c | ) |
Eq op.
bool ot_lib::ot_map::operator!= | ( | const ot_map & | v | ) |
Operator !=.
bool ot_lib::ot_map::operator== | ( | const ot_obj * | o | ) | const [inline, virtual] |