#include <it_bus/part.h>
Definition at line 36 of file part.h.
Public Types | |
enum | AutoDelete |
Enum indicating whether the value associated with the part should be deleted when the part is destroyed. More... | |
Public Member Functions | |
Part () throw (()) | |
Constructor. | |
Part (const QName &name, AnyType *value, AutoDelete auto_delete=NO_DELETE) throw (()) | |
Constructor. | |
Part (const QName &name, const AnyType *value, AutoDelete auto_delete=NO_DELETE) throw (()) | |
Constructor. | |
Part (const Part &other) | |
Constructor. | |
Part (Part &other, Boolean take_ownership) | |
Constructor. | |
void | operator= (const Part &) |
Assignment Operator. | |
void | refer (const Part &other) |
Refer to the value in the other part; does not take ownership. | |
void | take (Part &other) |
Refer to the value in the other part. | |
void | set_name (const QName &name) throw (()) |
Set the name of the part. | |
QName | get_name () const throw (()) |
Obtain the name of the part. | |
void | set_const_value (const AnyType *value, AutoDelete auto_delete=NO_DELETE) throw (()) |
Replace old value with const value. | |
void | set_modifiable_value (AnyType *value, AutoDelete auto_delete=NO_DELETE) throw (()) |
Replace old value with modifiable value. | |
Boolean | is_const () const throw (()) |
Obtain an indicator of whether this part is a const. | |
const AnyType & | get_const_value () const throw (()) |
Get a const pointer to the value associated with the part. | |
AnyType & | get_modifiable_value () throw ((NotModifiable)) |
Get a non-const pointer to the value associated with the part. | |
AnyType & | replace_if_const () throw ((IT_Reflect::ReflectException)) |
If the value is a const, replace it with a non-const copy created using reflection. | |
Boolean | get_skip () const |
Return an indicator of whether the part should be skipped when reading or writing the part value. | |
void | set_skip (Boolean) |
Set an indicator of whether the part should be skipped when reading or writing the part value. | |
Private Attributes | |
QName | m_name |
AnyType * | m_modifiable |
const AnyType * | m_const |
Boolean | m_skip |
AutoDelete | m_auto_delete |
IT_Bus::Part::Part | ( | const QName & | name, | |
AnyType * | value, | |||
AutoDelete | auto_delete = NO_DELETE | |||
) | throw (()) |
Constructor.
Refers to value, value must not be destroyed before this. If auto_delete is true, value will be deleted by the list.
QName | for the part. | |
A | pointer to an IT_Bus::AnyType that is the value to be associated with the part. | |
AutoDelete | enum. |
IT_Bus::Part::Part | ( | const QName & | name, | |
const AnyType * | value, | |||
AutoDelete | auto_delete = NO_DELETE | |||
) | throw (()) |
Constructor.
Refers to const value, value must not be destroyed before this. If auto_delete is true, value will be deleted by the list.
QName | for the part. | |
A | pointer to an IT_Bus::AnyType that is the value to be associated with the part. | |
AutoDelete | enum. |
IT_Bus::Part::Part | ( | const Part & | other | ) |
Constructor.
Make this part refer to value of another part.
A | reference to another IT_Bus::Part instance. |
Constructor.
If take_ownership is true and the other part owns its value then transfer ownership to the new part, otherwise refer to other's value.
A | reference to another IT_Bus::Part instance. | |
Boolean | indicating whether this instance should take ownership of the value. |
void IT_Bus::Part::operator= | ( | const Part & | ) |
Assignment Operator.
Make this part refer to value of another part.
A | reference to another IT_Bus::Part instance. |
void IT_Bus::Part::take | ( | Part & | other | ) |
Refer to the value in the other part.
If other part owns its value, take ownership; otherwise simply refer to the value.
void IT_Bus::Part::set_name | ( | const QName & | name | ) | throw (()) |
QName IT_Bus::Part::get_name | ( | ) | const throw (()) |
Boolean IT_Bus::Part::is_const | ( | ) | const throw (()) |
Obtain an indicator of whether this part is a const.
True if this part is const.
AnyType& IT_Bus::Part::get_modifiable_value | ( | ) | throw ((NotModifiable)) |
Get a non-const pointer to the value associated with the part.
NotModifiable | if the part is const. |
Boolean IT_Bus::Part::get_skip | ( | ) | const |
Return an indicator of whether the part should be skipped when reading or writing the part value.
True if part should be skipped when reading/writing.
void IT_Bus::Part::set_skip | ( | Boolean | ) |
Set an indicator of whether the part should be skipped when reading or writing the part value.
True indicates that the part should be skipped.