pvAccessCPP 7.1.8
Loading...
Searching...
No Matches
epics::pvAccess::ConfigurationStack Class Reference

Lookup configuration strings from a heap of sub-Configurations. More...

#include <utils/pv/configuration.h>

Inheritance diagram for epics::pvAccess::ConfigurationStack:
Collaboration diagram for epics::pvAccess::ConfigurationStack:

Public Types

typedef std::tr1::shared_ptr< Configurationshared_pointer
 
typedef std::tr1::shared_ptr< const Configurationconst_shared_pointer
 
typedef std::tr1::weak_ptr< Configurationweak_pointer
 
typedef std::tr1::weak_ptr< const Configurationconst_weak_pointer
 
typedef std::set< std::string > keys_t
 

Public Member Functions

void push_back (const confs_t::value_type &conf)
 
confs_t::value_type pop_back ()
 
size_t size () const
 
bool getPropertyAsBoolean (const std::string &name, const bool defaultValue) const
 Get the environment variable specified by name or return default value if it does not exist.
 
epics::pvData::int32 getPropertyAsInteger (const std::string &name, const epics::pvData::int32 defaultValue) const
 Get the environment variable specified by name or return default value if it does not exist.
 
float getPropertyAsFloat (const std::string &name, const float defaultValue) const
 Get the environment variable specified by name or return default value if it does not exist.
 
double getPropertyAsDouble (const std::string &name, const double defaultValue) const
 Get the environment variable specified by name or return default value if it does not exist.
 
std::string getPropertyAsString (const std::string &name, const std::string &defaultValue) const
 Get the environment variable specified by name or return default value if it does not exist.
 
bool getPropertyAsAddress (const std::string &name, osiSockAddr *addr) const
 Fetch and parse as a socket address and port number (address family set accordingly).
 
bool hasProperty (const std::string &name) const
 
keys_t keys () const
 Return a (partial) list of available key names.
 

Detailed Description

Lookup configuration strings from a heap of sub-Configurations.

Most recently push'd is checked first.

Definition at line 164 of file configuration.h.

Member Typedef Documentation

◆ const_shared_pointer

std::tr1::shared_ptr<const Configuration> epics::pvAccess::Configuration::const_shared_pointer
inherited

Definition at line 49 of file configuration.h.

◆ const_weak_pointer

std::tr1::weak_ptr<const Configuration> epics::pvAccess::Configuration::const_weak_pointer
inherited

Definition at line 49 of file configuration.h.

◆ keys_t

Definition at line 117 of file configuration.h.

◆ shared_pointer

std::tr1::shared_ptr<Configuration> epics::pvAccess::Configuration::shared_pointer
inherited

Definition at line 49 of file configuration.h.

◆ weak_pointer

std::tr1::weak_ptr<Configuration> epics::pvAccess::Configuration::weak_pointer
inherited

Definition at line 49 of file configuration.h.

Constructor & Destructor Documentation

◆ ConfigurationStack()

epics::pvAccess::ConfigurationStack::ConfigurationStack ( )
inline

Definition at line 172 of file configuration.h.

◆ ~ConfigurationStack()

virtual epics::pvAccess::ConfigurationStack::~ConfigurationStack ( )
inlinevirtual

Definition at line 173 of file configuration.h.

Member Function Documentation

◆ getPropertyAsAddress()

bool epics::pvAccess::Configuration::getPropertyAsAddress ( const std::string & name,
osiSockAddr * addr ) const
inherited

Fetch and parse as a socket address and port number (address family set accordingly).

At present only numeric addresses are parsed (eg. "127.0.0.1:4242").

The storage pointed to be addr should be initialized with a default value, or zeroed.

Parameters
namename of the environment variable to return. @pram addr pointer to the address struct to be filled in
Returns
true if addr now contains an address, false otherwise

◆ getPropertyAsBoolean()

bool epics::pvAccess::Configuration::getPropertyAsBoolean ( const std::string & name,
const bool defaultValue ) const
inherited

Get the environment variable specified by name or return default value if it does not exist.

Parameters
namename of the environment variable to return.
defualtValuedefault value to return if environment variable does not exists.
Returns
environment variable value as bool or default value if it does not exist.

◆ getPropertyAsDouble()

double epics::pvAccess::Configuration::getPropertyAsDouble ( const std::string & name,
const double defaultValue ) const
inherited

Get the environment variable specified by name or return default value if it does not exist.

Parameters
namename of the environment variable to return.
defualtValuedefault value to return if environment variable does not exists.
Returns
environment variable value as double or default value if it does not exist.

◆ getPropertyAsFloat()

float epics::pvAccess::Configuration::getPropertyAsFloat ( const std::string & name,
const float defaultValue ) const
inherited

Get the environment variable specified by name or return default value if it does not exist.

Parameters
namename of the environment variable to return.
defualtValuedefault value to return if environment variable does not exists.
Returns
environment variable value as float or default value if it does not exist.

◆ getPropertyAsInteger()

epics::pvData::int32 epics::pvAccess::Configuration::getPropertyAsInteger ( const std::string & name,
const epics::pvData::int32 defaultValue ) const
inherited

Get the environment variable specified by name or return default value if it does not exist.

Parameters
namename of the environment variable to return.
defualtValuedefault value to return if environment variable does not exists.
Returns
environment variable value as int32 or default value if it does not exist.

◆ getPropertyAsString()

std::string epics::pvAccess::Configuration::getPropertyAsString ( const std::string & name,
const std::string & defaultValue ) const
inherited

Get the environment variable specified by name or return default value if it does not exist.

Parameters
namename of the environment variable to return.
defualtValuedefault value to return if environment variable does not exists.
Returns
environment variable value as std::string or default value if it does not exist.

◆ keys()

keys_t epics::pvAccess::Configuration::keys ( ) const
inlineinherited

Return a (partial) list of available key names.

Does not include key names from the ConfigurationEnviron

Definition at line 121 of file configuration.h.

◆ pop_back()

confs_t::value_type epics::pvAccess::ConfigurationStack::pop_back ( )
inline

Definition at line 177 of file configuration.h.

◆ push_back()

void epics::pvAccess::ConfigurationStack::push_back ( const confs_t::value_type & conf)
inline

Definition at line 174 of file configuration.h.

◆ size()

size_t epics::pvAccess::ConfigurationStack::size ( ) const
inline

Definition at line 184 of file configuration.h.


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