#include <it_bus/part_list.h>
Definition at line 21 of file part_list.h.
Public Member Functions | |
PartList (size_t list_size=0) | |
Constructor. | |
~PartList () | |
Destructor. | |
const Part & | operator[] (size_t i) const |
Get part at the index i. | |
Part & | operator[] (size_t i) |
Get part at the index i. | |
size_t | size () const |
Return the size of the part list. | |
void | set_size (const size_t len) |
Set the size of part list. | |
void | add_const_part (const QName &name, const AnyType *part, Part::AutoDelete auto_delete=Part::NO_DELETE) |
Add a const part. | |
void | add_modifiable_part (const QName &name, AnyType *part, Part::AutoDelete auto_delete=Part::NO_DELETE) |
Add a modifiable part. | |
void | clear () |
Clear the list. | |
void | refer (const PartList &other) |
Make this list a copy of other list by referring to the parts in the other list. | |
void | take (PartList &other) |
Like refer, but for any parts that own their values in other list, transfer ownership to this list. | |
Private Types | |
typedef IT_Vector< Part > | Parts |
Private Attributes | |
Parts | m_parts |
size_t | m_count |
void IT_Bus::PartList::add_const_part | ( | const QName & | name, | |
const AnyType * | part, | |||
Part::AutoDelete | auto_delete = Part::NO_DELETE | |||
) |
Add a const part.
Must not be deleted before the list is. If auto_delete is true the list will delete the part.
QName | corresponding to the part | |
AnyType | the part being added | |
Part::AutoDelete | whether the list should be responsible for deleting the part |
Referenced by IT_Bus::add_const_part().
void IT_Bus::PartList::add_modifiable_part | ( | const QName & | name, | |
AnyType * | part, | |||
Part::AutoDelete | auto_delete = Part::NO_DELETE | |||
) |
Add a modifiable part.
Must not be deleted before the list is. If auto_delete is true the list will delete the part.
QName | corresponding to the part. | |
AnyType | the part being added. | |
Part::AutoDelete | whether the list should be responsible for deleting the part. |
Referenced by IT_Bus::add_modifiable_part().
Part& IT_Bus::PartList::operator[] | ( | size_t | i | ) |
const Part& IT_Bus::PartList::operator[] | ( | size_t | i | ) | const |
void IT_Bus::PartList::set_size | ( | const size_t | len | ) |
Set the size of part list.
size_t |
size_t IT_Bus::PartList::size | ( | ) | const |
Return the size of the part list.