Public Types | Public Member Functions
openfluid::core::Datastore Class Reference

Container class for holding information about additional resources relating to a project. More...

List of all members.

Public Types

typedef std::map< std::string,
DatastoreItem * > 
DataItemsById_t
 Map indexing DatastoreItems by ID.

Public Member Functions

 Datastore ()
 Creates an empty datastore.
 ~Datastore ()
 Destroys all items of the datastore.
DataItemsById_t getItems ()
 Gets all items of the datastore.
const DataItemsById_t getItems () const
 Gets all items of the datastore.
DatastoreItemgetItem (std::string ItemID)
 Gets the item of the datastore matching the given ID.
void addItem (DatastoreItem *Item)
 Adds an item to the datastore.

Detailed Description

Container class for holding information about additional resources relating to a project.


Member Typedef Documentation

Map indexing DatastoreItems by ID.


Constructor & Destructor Documentation

Creates an empty datastore.

Destroys all items of the datastore.


Member Function Documentation

Adds an item to the datastore.

If an item already exists with the ID of the given Item, it is deleted before adding.

Parameters:
ItemThe item to add.

Gets the item of the datastore matching the given ID.

Parameters:
ItemIDID of the expected item.
Returns:
The item with the given ID, or 0 if not found.

Gets all items of the datastore.

Returns:
A map of all items of the datastore.

Gets all items of the datastore.

Returns:
A const map of all items of the datastore.

Generated using Doxygen 1.7.6.1
Creative Commons License Creative Commons By-NC-ND license