PST File Format SDK v0.4
Loading...
Searching...
No Matches
pstsdk::name_id_map Class Reference

A named property map abstraction. More...

#include <nameid.h>

+ Inheritance diagram for pstsdk::name_id_map:
+ Collaboration diagram for pstsdk::name_id_map:

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_idget_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.
 

Detailed Description

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.

See also
[MS-PST] 2.4.7

Definition at line 75 of file nameid.h.

Constructor & Destructor Documentation

◆ name_id_map()

pstsdk::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

Parameters
dbThe store to get the named property mapping for

Definition at line 82 of file nameid.h.

Member Function Documentation

◆ get_prop_count()

size_t pstsdk::name_id_map::get_prop_count ( ) const
inline

Get the total count of named property mappings in this store.

Returns
The count of named property mappings in this store

Definition at line 279 of file nameid.h.

◆ get_prop_list()

std::vector< prop_id > pstsdk::name_id_map::get_prop_list ( ) const
inline

Get all of the prop_ids which have a named_prop mapping in this store.

Returns
a vector of prop_ids

Definition at line 265 of file nameid.h.

◆ id_exists()

bool pstsdk::name_id_map::id_exists ( const guid g,
long  id 
) const
inline

Query if a given named prop exists.

Parameters
[in]gThe namespace guid for the named prop
[in]idThe name of the named prop
Returns
true If the named property has a prop_id mapped

Definition at line 95 of file nameid.h.

◆ lookup() [1/4]

prop_id pstsdk::name_id_map::lookup ( const guid g,
const std::wstring &  name 
) const
inline

Get the associated prop_id of the named property.

Exceptions
key_not_found<named_prop>If the named prop doesn't have a prop_id mapping
Parameters
[in]gThe namespace guid for the named prop
[in]nameThe name of the named prop
Returns
The mapped prop_id of this named property

Definition at line 118 of file nameid.h.

◆ lookup() [2/4]

prop_id pstsdk::name_id_map::lookup ( const guid g,
long  id 
) const
inline

Get the associated prop_id of the named property.

Exceptions
key_not_found<named_prop>If the named prop doesn't have a prop_id mapping
Parameters
[in]gThe namespace guid for the named prop
[in]idThe name of the named prop
Returns
The mapped prop_id of this named property

Definition at line 125 of file nameid.h.

◆ lookup() [3/4]

pstsdk::prop_id pstsdk::name_id_map::lookup ( const named_prop p) const
inline

Get the associated prop_id of the named property.

Exceptions
key_not_found<named_prop>If the named prop doesn't have a prop_id mapping
Parameters
[in]pA constructed named_prop object
Returns
The mapped prop_id of this named property

Definition at line 286 of file nameid.h.

◆ lookup() [4/4]

pstsdk::named_prop pstsdk::name_id_map::lookup ( prop_id  id) const
inline

Get the associated named_prop of this prop_id.

Exceptions
key_not_found<prop_id>If the prop_id doesn't have a named_prop mapping
Parameters
[in]idThe prop id to lookup
Returns
The associated named_prop object

Definition at line 337 of file nameid.h.

◆ name_exists()

bool pstsdk::name_id_map::name_exists ( const guid g,
const std::wstring &  name 
) const
inline

Query if a given named prop exists.

Parameters
[in]gThe namespace guid for the named prop
[in]nameThe name of the named prop
Returns
true If the named property has a prop_id mapped

Definition at line 89 of file nameid.h.

◆ named_prop_exists()

bool pstsdk::name_id_map::named_prop_exists ( const named_prop p) const
inline

Query if a given named prop exists.

Parameters
[in]pA constructed named_prop object
Returns
true If the named property has a prop_id mapped

Definition at line 243 of file nameid.h.

◆ prop_id_exists()

bool pstsdk::name_id_map::prop_id_exists ( prop_id  id) const
inline

Query if a given prop_id has a named_prop mapped to it.

Parameters
[in]idThe prop_id to check
Returns
true If the prop_id has a named_prop mapped

Definition at line 256 of file nameid.h.


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