Public Types | Public Member Functions | List of all members
openfluid::core::Datastore Class Reference

#include <core/Datastore.hpp>

Public Types

typedef std::map< std::string, DatastoreItem * > DataItemsById_t
 

Public Member Functions

 Datastore ()
 
 ~Datastore ()
 
DataItemsById_t getItems ()
 
const DataItemsById_t getItems () const
 
DatastoreItemitem (const std::string &ItemID)
 
void addItem (const DatastoreItem *Item)
 

Detailed Description

Container class for holding information about additional resources.

Member Typedef Documentation

Type to store items indexed by their ID

Constructor & Destructor Documentation

openfluid::core::Datastore::Datastore ( )

Creates an empty datastore.

openfluid::core::Datastore::~Datastore ( )

Destroys all items of the datastore.

Member Function Documentation

void openfluid::core::Datastore::addItem ( const DatastoreItem Item)

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

Parameters
[in]ItemThe item to add.
DataItemsById_t openfluid::core::Datastore::getItems ( )

Gets all items of the datastore.

Returns
A map of all items of the datastore.
const DataItemsById_t openfluid::core::Datastore::getItems ( ) const

Gets all items of the datastore.

Returns
A const map of all items of the datastore.
DatastoreItem* openfluid::core::Datastore::item ( const std::string &  ItemID)

Gets the item of the datastore matching the given ID.

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

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