Fairport
v1.0.38
|
A named property map abstraction. More...
#include <nameid.h>
Public Member Functions | |
name_id_map (const shared_db_ptr &db) | |
Construct a name_id_map for the given store. | |
bool | name_exists (const guid &g, const std::wstring &name) const |
Query if a given named prop exists. | |
bool | id_exists (const guid &g, long id) const |
Query if a given named prop exists. | |
bool | named_prop_exists (const named_prop &p) const |
Query if a given named prop exists. | |
bool | prop_id_exists (prop_id id) const |
Query if a given prop_id has a named_prop mapped to it. | |
size_t | get_prop_count () const |
Get the total count of named property mappings in this store. | |
std::vector< prop_id > | get_prop_list () const |
Get all of the prop_ids which have a named_prop mapping in this store. | |
prop_id | lookup (const guid &g, const std::wstring &name) const |
Get the associated prop_id of the named property. | |
prop_id | lookup (const guid &g, long id) const |
Get the associated prop_id of the named property. | |
prop_id | lookup (const named_prop &p) const |
Get the associated prop_id of the named property. | |
named_prop | lookup (prop_id id) const |
Get the associated named_prop of this prop_id. |
A named property map abstraction.
This class abstractions away the logic of doing named property lookups in a message store.
To use this class, one just constructs it with a store pointer and calls the various lookup overloads as needed.
fairport::name_id_map::name_id_map | ( | const shared_db_ptr & | db | ) | [inline] |
Construct a name_id_map for the given store.
This will open the name_id_map node for the store
db | The store to get the named property mapping for |
size_t fairport::name_id_map::get_prop_count | ( | ) | const [inline] |
std::vector< prop_id > fairport::name_id_map::get_prop_list | ( | ) | const [inline] |
Get all of the prop_ids which have a named_prop mapping in this store.
bool fairport::name_id_map::id_exists | ( | const guid & | g, |
long | id | ||
) | const [inline] |
Get the associated prop_id of the named property.
key_not_found<named_prop> | If the named prop doesn't have a prop_id mapping |
[in] | g | The namespace guid for the named prop |
[in] | name | The name of the named prop |
Get the associated prop_id of the named property.
key_not_found<named_prop> | If the named prop doesn't have a prop_id mapping |
[in] | g | The namespace guid for the named prop |
[in] | id | The name of the named prop |
fairport::prop_id fairport::name_id_map::lookup | ( | const named_prop & | p | ) | const [inline] |
Get the associated prop_id of the named property.
key_not_found<named_prop> | If the named prop doesn't have a prop_id mapping |
[in] | p | A constructed named_prop object |
fairport::named_prop fairport::name_id_map::lookup | ( | prop_id | id | ) | const [inline] |
Get the associated named_prop of this prop_id.
key_not_found<prop_id> | If the prop_id doesn't have a named_prop mapping |
[in] | id | The prop id to lookup |
bool fairport::name_id_map::name_exists | ( | const guid & | g, |
const std::wstring & | name | ||
) | const [inline] |
bool fairport::name_id_map::named_prop_exists | ( | const named_prop & | p | ) | const [inline] |
Query if a given named prop exists.
[in] | p | A constructed named_prop object |
bool fairport::name_id_map::prop_id_exists | ( | prop_id | id | ) | const [inline] |
Query if a given prop_id has a named_prop mapped to it.
[in] | id | The prop_id to check |