Apama  10.5.4.1
com::softwareag::connectivity::MapHelper Class Reference

[DEPRECATED]
Helper class for extracting values from a string->data_t map_t in a type-safe way with error checking and support for default 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

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

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

Deprecated:
This class has been deprecated; we recommend using the MapExtractor class for this purpose instead.

Member Function Documentation

◆ getBoolean() [1/4]

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.

◆ getBoolean() [2/4]

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.

◆ getBoolean() [3/4]

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.

◆ getBoolean() [4/4]

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.

◆ getDouble() [1/4]

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.

◆ getDouble() [2/4]

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.

◆ getDouble() [3/4]

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.

◆ getDouble() [4/4]

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.

◆ getInteger() [1/4]

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.

◆ getInteger() [2/4]

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.

◆ getInteger() [3/4]

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.

◆ getInteger() [4/4]

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.

◆ getList() [1/4]

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.

◆ getList() [2/4]

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.

◆ getList() [3/4]

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.

◆ getList() [4/4]

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.

◆ getMap() [1/4]

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.

◆ getMap() [2/4]

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.

◆ getMap() [3/4]

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.

◆ getMap() [4/4]

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.

◆ getString() [1/4]

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.

◆ getString() [2/4]

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.

◆ getString() [3/4]

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.

◆ getString() [4/4]

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: