#include "configuration.h"
|
typedef std::set< std::string > | keys_t |
|
Configuration
Definition at line 45 of file configuration.h.
epics::pvAccess::Configuration::Configuration |
( |
| ) |
|
|
inline |
epics::pvAccess::Configuration::~Configuration |
( |
| ) |
|
|
pure virtual |
virtual void epics::pvAccess::Configuration::addKeys |
( |
keys_t & |
| ) |
const |
|
inlineprotectedvirtual |
bool epics::pvAccess::Configuration::getPropertyAsAddress |
( |
const std::string & |
name, |
|
|
osiSockAddr * |
addr |
|
) |
| const |
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
-
name | name of the environment variable to return. addr pointer to the address struct to be filled in |
- Returns
- true if addr now contains an address, false otherwise
Definition at line 84 of file configuration.cpp.
86 unsigned short dftport=0;
87 if(addr->
sa.sa_family==AF_INET)
88 dftport = ntohs(addr->
ia.sin_port);
92 if(val.empty())
return false;
94 memset(addr, 0,
sizeof(*addr));
95 addr->
ia.sin_family = AF_INET;
LIBCOM_API int epicsStdCall aToIPAddr(const char *pAddrString, unsigned short defaultPort, struct sockaddr_in *pIP)
std::string getPropertyAsString(const std::string &name, const std::string &defaultValue) const
bool epics::pvAccess::Configuration::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.
- Parameters
-
name | name of the environment variable to return. |
defualtValue | default value to return if environment variable does not exists. |
- Returns
- environment variable value as bool or default value if it does not exist.
Definition at line 31 of file configuration.cpp.
34 std::transform(value.begin(), value.end(), value.begin(), ::tolower);
36 bool isTrue = (value ==
"1") || (value ==
"true") || (value ==
"yes");
40 bool isFalse = (value ==
"0") || (value ==
"false") || (value ==
"no");
std::string getPropertyAsString(const std::string &name, const std::string &defaultValue) const
double epics::pvAccess::Configuration::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.
- Parameters
-
name | name of the environment variable to return. |
defualtValue | default value to return if environment variable does not exists. |
- Returns
- environment variable value as double or default value if it does not exist.
Definition at line 66 of file configuration.cpp.
70 }
catch(std::runtime_error&) {
std::string getPropertyAsString(const std::string &name, const std::string &defaultValue) const
float epics::pvAccess::Configuration::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.
- Parameters
-
name | name of the environment variable to return. |
defualtValue | default value to return if environment variable does not exists. |
- Returns
- environment variable value as float or default value if it does not exist.
Definition at line 57 of file configuration.cpp.
61 }
catch(std::runtime_error&) {
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.
- Parameters
-
name | name of the environment variable to return. |
defualtValue | default value to return if environment variable does not exists. |
- Returns
- environment variable value as int32 or default value if it does not exist.
Definition at line 48 of file configuration.cpp.
52 }
catch(std::runtime_error&) {
std::string getPropertyAsString(const std::string &name, const std::string &defaultValue) const
std::string epics::pvAccess::Configuration::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.
- Parameters
-
name | name of the environment variable to return. |
defualtValue | default value to return if environment variable does not exists. |
- Returns
- environment variable value as std::string or default value if it does not exist.
Definition at line 75 of file configuration.cpp.
virtual bool tryGetPropertyAsString(const std::string &name, std::string *val) const =0
bool epics::pvAccess::Configuration::hasProperty |
( |
const std::string & |
name | ) |
const |
Definition at line 101 of file configuration.cpp.
virtual bool tryGetPropertyAsString(const std::string &name, std::string *val) const =0
keys_t epics::pvAccess::Configuration::keys |
( |
| ) |
const |
|
inline |
Return a (partial) list of available key names. Does not include key names from the ConfigurationEnviron
Definition at line 121 of file configuration.h.
std::set< std::string > keys_t
virtual void addKeys(keys_t &) const
epics::pvAccess::Configuration::POINTER_DEFINITIONS |
( |
Configuration |
| ) |
|
virtual bool epics::pvAccess::Configuration::tryGetPropertyAsString |
( |
const std::string & |
name, |
|
|
std::string * |
val |
|
) |
| const |
|
protectedpure virtual |
The documentation for this class was generated from the following files: