|
Fairport
v1.0.38
|
Property Context (PC) Implementation. More...
#include <propbag.h>
Inheritance diagram for fairport::property_bag:
Collaboration diagram for fairport::property_bag:Public Member Functions | |
| property_bag (const node &n) | |
| Construct a property_bag from this node. | |
| property_bag (const heap &h) | |
| Construct a property_bag from this heap. | |
| property_bag (const property_bag &other) | |
| Copy construct a property_bag. | |
| property_bag (property_bag &&other) | |
| Move construct a property_bag. | |
| std::vector< prop_id > | get_prop_list () const |
| Get a list of all properties on this object. | |
| prop_type | get_prop_type (prop_id id) const |
| Get the property type of a given prop_id. | |
| bool | prop_exists (prop_id id) const |
| Indicates the existance of a given property on this object. | |
| size_t | size (prop_id id) const |
| Returns the total size of a variable length property. | |
| hnid_stream_device | open_prop_stream (prop_id id) |
| Creates a stream device over a property on this object. | |
| const node & | get_node () const |
| Get the node underlying this property_bag. | |
| node & | get_node () |
| Get the node underlying this property_bag. | |
Property Context (PC) Implementation.
A Property Context is simply a BTH where the BTH is stored as the client root allocation in the heap. The BTH contains a "prop_entry", which is defines the type of the property and it's storage.
const_property_object does most of the heavy lifting in terms of property access and interpretation.
| fairport::property_bag::property_bag | ( | const node & | n | ) | [inline, explicit] |
Construct a property_bag from this node.
| [in] | n | The node to copy and interpret as a property_bag |
| fairport::property_bag::property_bag | ( | const heap & | h | ) | [inline, explicit] |
Construct a property_bag from this heap.
| [in] | h | The heap to copy and interpret as a property_bag |
| fairport::property_bag::property_bag | ( | const property_bag & | other | ) | [inline] |
Copy construct a property_bag.
| other | The property bag to copy |
| fairport::property_bag::property_bag | ( | property_bag && | other | ) | [inline] |
Move construct a property_bag.
| other | The property bag to move from |
| const node& fairport::property_bag::get_node | ( | ) | const [inline] |
Get the node underlying this property_bag.
| node& fairport::property_bag::get_node | ( | ) | [inline] |
Get the node underlying this property_bag.
| std::vector< fairport::prop_id > fairport::property_bag::get_prop_list | ( | ) | const [inline, virtual] |
Get a list of all properties on this object.
Implements fairport::const_property_object.
Get the property type of a given prop_id.
| [in] | id | The prop_id |
| key_not_found<prop_id> | If the specified property is not present |
Implements fairport::const_property_object.
| fairport::hnid_stream_device fairport::property_bag::open_prop_stream | ( | prop_id | id | ) | [inline, virtual] |
Creates a stream device over a property on this object.
The returned stream device can be used to construct a proper stream:
const_property_object* po = ...; prop_stream nstream(po->open_prop_stream(0x3001));
Which can then be used as any iostream would be.
| [in] | id | The prop_id |
| key_not_found<prop_id> | If the specified property is not present |
Implements fairport::const_property_object.
| bool fairport::property_bag::prop_exists | ( | prop_id | id | ) | const [inline, virtual] |
Indicates the existance of a given property on this object.
| [in] | id | The prop_id |
Implements fairport::const_property_object.
| size_t fairport::property_bag::size | ( | prop_id | id | ) | const [inline, virtual] |
Returns the total size of a variable length property.
| [in] | id | The prop_id |
Implements fairport::const_property_object.