Apama  9.10.0.4.289795
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | List of all members
com::softwareag::connectivity::MapHelper Class Reference

Helper class for extracting values from a string->data_t map_t in a type-safe way with error checking and support for defalut values. More...

#include <sag_connectivity_cpp.hpp>

Static Public Member Functions

static std::string getString (const map_t &map, const char *key)
 Get a string value from the map, throwing if the key is not present. More...
 
static std::string getString (const map_t &map, const char *key, const char *defaultValue)
 Get a string value from the map, returning the given default if the key is not present. More...
 
static std::string getString (const map_t &map, const std::string &key)
 Get a string value from the map, throwing if the key is not present. More...
 
static std::string getString (const map_t &map, const std::string &key, const std::string &defaultValue)
 Get a string value from the map, returning the given default if the key is not present. More...
 
static int64_t getInteger (const map_t &map, const char *key)
 Get an integer value from the map, throwing if the key is not present. More...
 
static int64_t getInteger (const map_t &map, const char *key, int64_t defaultValue)
 Get an integer value from the map, returning the given default if the key is not present. More...
 
static int64_t getInteger (const map_t &map, const std::string &key)
 Get an integer value from the map, throwing if the key is not present. More...
 
static int64_t getInteger (const map_t &map, const std::string &key, int64_t defaultValue)
 Get an integer value from the map, returning the given default if the key is not present. More...
 
static double getDouble (const map_t &map, const char *key)
 Get a double value from the map, throwing if the key is not present. More...
 
static double getDouble (const map_t &map, const char *key, double defaultValue)
 Get a double value from the map, returning the given default if the key is not present. More...
 
static double getDouble (const map_t &map, const std::string &key)
 Get a double value from the map, throwing if the key is not present. More...
 
static double getDouble (const map_t &map, const std::string &key, double defaultValue)
 Get a double value from the map, returning the given default if the key is not present. More...
 
static bool getBoolean (const map_t &map, const char *key)
 Get a boolean value from the map, throwing if the key is not present. More...
 
static bool getBoolean (const map_t &map, const char *key, bool defaultValue)
 Get a boolean value from the map, returning the given default if the key is not present. More...
 
static bool getBoolean (const map_t &map, const std::string &key)
 Get a boolean value from the map, throwing if the key is not present. More...
 
static bool getBoolean (const map_t &map, const std::string &key, bool defaultValue)
 Get a boolean value from the map, returning the given default if the key is not present. More...
 
static const map_tgetMap (const map_t &map, const char *key)
 Get a map value from the map, throwing if the key is not present. More...
 
static const map_tgetMap (const map_t &map, const char *key, const map_t &defaultValue)
 Get a map value from the map, returning the given default if the key is not present. More...
 
static const map_tgetMap (const map_t &map, const std::string &key)
 Get a map value from the map, throwing if the key is not present. More...
 
static const map_tgetMap (const map_t &map, const std::string &key, const map_t &defaultValue)
 Get a map value from the map, returning the given default if the key is not present. More...
 
static const list_tgetList (const map_t &map, const char *key)
 Get a list value from the map, throwing if the key is not present. More...
 
static const list_tgetList (const map_t &map, const char *key, const list_t &defaultValue)
 Get a list value from the map, returning the given default if the key is not present. More...
 
static const list_tgetList (const map_t &map, const std::string &key)
 Get a list value from the map, throwing if the key is not present. More...
 
static const list_tgetList (const map_t &map, const std::string &key, const list_t &defaultValue)
 Get a list value from the map, returning the given default if the key is not present. More...
 

Detailed Description

Helper class for extracting values from a string->data_t map_t in a type-safe way with error checking and support for defalut values.

It can be used by plugins for extracting values from both configuration and message payloads.

Member Function Documentation

static bool com::softwareag::connectivity::MapHelper::getBoolean ( const map_t map,
const char *  key 
)
inlinestatic

Get a boolean value from the map, throwing if the key is not present.

static bool com::softwareag::connectivity::MapHelper::getBoolean ( const map_t map,
const char *  key,
bool  defaultValue 
)
inlinestatic

Get a boolean value from the map, returning the given default if the key is not present.

static bool com::softwareag::connectivity::MapHelper::getBoolean ( const map_t map,
const std::string &  key 
)
inlinestatic

Get a boolean value from the map, throwing if the key is not present.

static bool com::softwareag::connectivity::MapHelper::getBoolean ( const map_t map,
const std::string &  key,
bool  defaultValue 
)
inlinestatic

Get a boolean value from the map, returning the given default if the key is not present.

static double com::softwareag::connectivity::MapHelper::getDouble ( const map_t map,
const char *  key 
)
inlinestatic

Get a double value from the map, throwing if the key is not present.

static double com::softwareag::connectivity::MapHelper::getDouble ( const map_t map,
const char *  key,
double  defaultValue 
)
inlinestatic

Get a double value from the map, returning the given default if the key is not present.

static double com::softwareag::connectivity::MapHelper::getDouble ( const map_t map,
const std::string &  key 
)
inlinestatic

Get a double value from the map, throwing if the key is not present.

static double com::softwareag::connectivity::MapHelper::getDouble ( const map_t map,
const std::string &  key,
double  defaultValue 
)
inlinestatic

Get a double value from the map, returning the given default if the key is not present.

static int64_t com::softwareag::connectivity::MapHelper::getInteger ( const map_t map,
const char *  key 
)
inlinestatic

Get an integer value from the map, throwing if the key is not present.

static int64_t com::softwareag::connectivity::MapHelper::getInteger ( const map_t map,
const char *  key,
int64_t  defaultValue 
)
inlinestatic

Get an integer value from the map, returning the given default if the key is not present.

static int64_t com::softwareag::connectivity::MapHelper::getInteger ( const map_t map,
const std::string &  key 
)
inlinestatic

Get an integer value from the map, throwing if the key is not present.

static int64_t com::softwareag::connectivity::MapHelper::getInteger ( const map_t map,
const std::string &  key,
int64_t  defaultValue 
)
inlinestatic

Get an integer value from the map, returning the given default if the key is not present.

static const list_t& com::softwareag::connectivity::MapHelper::getList ( const map_t map,
const char *  key 
)
inlinestatic

Get a list value from the map, throwing if the key is not present.

static const list_t& com::softwareag::connectivity::MapHelper::getList ( const map_t map,
const char *  key,
const list_t defaultValue 
)
inlinestatic

Get a list value from the map, returning the given default if the key is not present.

static const list_t& com::softwareag::connectivity::MapHelper::getList ( const map_t map,
const std::string &  key 
)
inlinestatic

Get a list value from the map, throwing if the key is not present.

static const list_t& com::softwareag::connectivity::MapHelper::getList ( const map_t map,
const std::string &  key,
const list_t defaultValue 
)
inlinestatic

Get a list value from the map, returning the given default if the key is not present.

static const map_t& com::softwareag::connectivity::MapHelper::getMap ( const map_t map,
const char *  key 
)
inlinestatic

Get a map value from the map, throwing if the key is not present.

static const map_t& com::softwareag::connectivity::MapHelper::getMap ( const map_t map,
const char *  key,
const map_t defaultValue 
)
inlinestatic

Get a map value from the map, returning the given default if the key is not present.

static const map_t& com::softwareag::connectivity::MapHelper::getMap ( const map_t map,
const std::string &  key 
)
inlinestatic

Get a map value from the map, throwing if the key is not present.

static const map_t& com::softwareag::connectivity::MapHelper::getMap ( const map_t map,
const std::string &  key,
const map_t defaultValue 
)
inlinestatic

Get a map value from the map, returning the given default if the key is not present.

static std::string com::softwareag::connectivity::MapHelper::getString ( const map_t map,
const char *  key 
)
inlinestatic

Get a string value from the map, throwing if the key is not present.

static std::string com::softwareag::connectivity::MapHelper::getString ( const map_t map,
const char *  key,
const char *  defaultValue 
)
inlinestatic

Get a string value from the map, returning the given default if the key is not present.

static std::string com::softwareag::connectivity::MapHelper::getString ( const map_t map,
const std::string &  key 
)
inlinestatic

Get a string value from the map, throwing if the key is not present.

static std::string com::softwareag::connectivity::MapHelper::getString ( const map_t map,
const std::string &  key,
const std::string &  defaultValue 
)
inlinestatic

Get a string value from the map, returning the given default if the key is not present.


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