Fairport  v1.0.38
fairport::property_bag Class Reference

Property Context (PC) Implementation. More...

#include <propbag.h>

+ Inheritance diagram for fairport::property_bag:
+ Collaboration diagram for fairport::property_bag:

List of all members.

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_idget_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 nodeget_node () const
 Get the node underlying this property_bag.
nodeget_node ()
 Get the node underlying this property_bag.

Detailed Description

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.

See also:
[MS-PST] 2.3.3

Definition at line 40 of file propbag.h.


Constructor & Destructor Documentation

fairport::property_bag::property_bag ( const node n) [inline, explicit]

Construct a property_bag from this node.

Parameters:
[in]nThe node to copy and interpret as a property_bag

Definition at line 91 of file propbag.h.

fairport::property_bag::property_bag ( const heap h) [inline, explicit]

Construct a property_bag from this heap.

Parameters:
[in]hThe heap to copy and interpret as a property_bag

Definition at line 98 of file propbag.h.

fairport::property_bag::property_bag ( const property_bag other) [inline]

Copy construct a property_bag.

Parameters:
otherThe property bag to copy

Definition at line 110 of file propbag.h.

fairport::property_bag::property_bag ( property_bag &&  other) [inline]

Move construct a property_bag.

Parameters:
otherThe property bag to move from

Definition at line 56 of file propbag.h.


Member Function Documentation

const node& fairport::property_bag::get_node ( ) const [inline]

Get the node underlying this property_bag.

Returns:
The node

Definition at line 68 of file propbag.h.

node& fairport::property_bag::get_node ( ) [inline]

Get the node underlying this property_bag.

Returns:
The node

Definition at line 71 of file propbag.h.

std::vector< fairport::prop_id > fairport::property_bag::get_prop_list ( ) const [inline, virtual]

Get a list of all properties on this object.

Returns:
A vector of all properties on this object

Implements fairport::const_property_object.

Definition at line 117 of file propbag.h.

prop_type fairport::property_bag::get_prop_type ( prop_id  id) const [inline, virtual]

Get the property type of a given prop_id.

Parameters:
[in]idThe prop_id
Exceptions:
key_not_found<prop_id>If the specified property is not present
Returns:
The type of the prop_id

Implements fairport::const_property_object.

Definition at line 60 of file propbag.h.

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.

Note:
This is operation is only valid for variable length properties
Parameters:
[in]idThe prop_id
Exceptions:
key_not_found<prop_id>If the specified property is not present
Returns:
A stream device for the requested property

Implements fairport::const_property_object.

Definition at line 197 of file propbag.h.

bool fairport::property_bag::prop_exists ( prop_id  id) const [inline, virtual]

Indicates the existance of a given property on this object.

Parameters:
[in]idThe prop_id
Returns:
true if the property exists

Implements fairport::const_property_object.

Definition at line 145 of file propbag.h.

size_t fairport::property_bag::size ( prop_id  id) const [inline, virtual]

Returns the total size of a variable length property.

Note:
This operation is only valid for variable length properties
Parameters:
[in]idThe prop_id
Returns:
The vector.size() if read_prop was called for this prop

Implements fairport::const_property_object.

Definition at line 187 of file propbag.h.


The documentation for this class was generated from the following file: