FNSS C++ library
C++ API for the Fast Network Simulation Setup (FNSS) toolchain
 All Classes Functions Typedefs Pages
Classes | Public Member Functions | List of all members
fnss::PropertyContainer Class Reference

#include <property-container.h>

+ Inheritance diagram for fnss::PropertyContainer:

Classes

class  PropertyNotFoundException
 

Public Member Functions

std::string getProperty (const std::string &name) const
 
void setProperty (const std::string &name, const std::string &value="")
 
bool hasProperty (const std::string &name) const
 
void addProperties (const PropertyContainer &other)
 
std::string removeProperty (const std::string &name)
 
std::set< std::string > getAllProperties () const
 

Detailed Description

Container class for <property_name, property_value> type data.

Author
Cosmin Cocora

Member Function Documentation

void fnss::PropertyContainer::addProperties ( const PropertyContainer other)

Add or overwrite all the properties from a different PropertyContainer.

Parameters
otherthe object to copy the properties from.
std::set< std::string > fnss::PropertyContainer::getAllProperties ( ) const

Delete the specified property.

Parameters
namename of the property.
foundset to true if the specified property was found, false otherwise.
Returns
value of the property ("" if not available). Get all the property names in a set.
set containing all the property names.
std::string fnss::PropertyContainer::getProperty ( const std::string &  name) const

Get the value of the specified property.

Throws an exception if the specified property was not found.

Parameters
std::stringname of the property.
Returns
value of the property.
bool fnss::PropertyContainer::hasProperty ( const std::string &  name) const

Check whether the PropertyContainer has a specified property.

Parameters
namethe name of the property to check.
std::string fnss::PropertyContainer::removeProperty ( const std::string &  name)

Delete the specified property.

Throws an exception if the specified property was not found.

Parameters
namename of the property.
Returns
value of the property.
void fnss::PropertyContainer::setProperty ( const std::string &  name,
const std::string &  value = "" 
)

Get the value of the specified property.

Parameters
std::stringname of the property.
foundset to true if the specified property was found, false otherwise
Returns
value of the property ("" if not available). Create or overwrite a property.
Parameters
namename of the property.
valuevalue of the property.

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