Apama  10.2.0.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
com::softwareag::connectivity Namespace Reference

Contains classes relating to the connectivity system. More...

Classes

class  AbstractCodec
 Base class for codec plug-ins. More...
 
class  AbstractSimpleCodec
 Base class that simplifies implementation of codec plug-ins that deal only with individual messages not batches, and ignore messages with null payloads. More...
 
class  AbstractSimpleTransport
 Base class that simplifies implementation of transport plug-ins that deal only with individual messages not batches, and ignore messages with null payloads. More...
 
class  AbstractTransport
 Base class for transport plug-ins. More...
 
class  buffer_t
 A class that holds an untyped byte buffer. More...
 
class  const_visitor
 Helper class for writing visitors to apply to data_t. More...
 
class  custom_t
 A wrapper type for holding arbitrary objects inside a data_t. More...
 
class  data_t
 A variant type which can be one of the following: More...
 
class  HostSide
 An interface to the next component (plugin or host) towards the host. More...
 
class  list_t
 A list class which implements many of the functions on std::vector. More...
 
class  Logger
 Class for writing to the system logger. More...
 
class  map_t
 A map class which implements many of the functions on std::map. More...
 
class  MapExtractor
 Provides a compile-time type-safe way to extract values from a map_t, with user-friendly error messages identifying the map and key within the map if any item is missing. More...
 
class  MapHelper
 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...
 
class  Message
 A container for an payload and associated metadata. More...
 
class  metadata_t
 A map class which implements many of the functions on std::map. More...
 
class  Plugin
 Base of the inheritance tree for Connectivity plugins. More...
 
class  PluginConstructorParameters
 A base interface for parameters passed to the constructor of transport or codec plug-ins. More...
 
class  PluginHost
 Interface to support miscellaneous requests from a particular plug-in to the host system. More...
 
class  SAG_LOCK_GUARD
 A simple RAII wrapper for SAG_MUTEX_T that locks the specified mutex in its constructor, and guarantees that it will be unlocked when this object goes out of scope unless it has been unlocked already by that point. More...
 
class  StatusReporter
 A class allowing a plug-in to report status values to the host. More...
 
class  TransportSide
 An interface to the next component (plugin or host) towards the transport. More...
 
class  visitor
 Helper class for writing visitors to apply to data_t. More...
 

Typedefs

typedef sag_underlying_decimal_t decimal_t
 Decimals are implemented with an underlying 64bit int conforming to IEEE 754 decimal 64. More...
 

Enumerations

enum  Direction { Direction::TOWARDS_HOST = 1, Direction::TOWARDS_TRANSPORT = 2 }
 The enumeration indicating the direction of message flow - towards the transport or towards the host. More...
 

Functions

template<typename V >
V::result_type apply_visitor (const V &v, data_t &t)
 Apply a visitor (using the boost::static_visitor pattern) to the given data_t. More...
 
template<typename V >
V::result_type apply_visitor (const V &v, const data_t &t)
 Apply a visitor (using the boost::static_visitor pattern) to the given data_t. More...
 
template<typename T >
get_details::GetVisitor< const
T >::result_type 
get (const data_t &t)
 Get the contents of a data_t, given the type. More...
 
template<>
const data_tget< const data_t & > (const data_t &t)
 Specialization to be a pass-through, for use in a templated context. More...
 
template<typename T >
get_details::GetVisitor< T >
::result_type 
get (data_t &t)
 Get the contents of a data_t, given the type. More...
 
template<>
data_tget< data_t & > (data_t &t)
 Specialization to be a pass-through, for use in a templated context. More...
 
template<typename T >
get_details::GetVisitor
< custom_t< T > >::result_type 
get_custom (data_t &t)
 Get the contents of the data_t as a typed custom_t. More...
 
template<typename T >
get_details::GetVisitor< const
custom_t< T > >::result_type 
get_custom (const data_t &t)
 Get the contents of the data_t as a typed custom_t. More...
 
template<typename T >
convert_to (const data_t &d)
 Get a T from a data_t, parsing it from a string if necessary/possible. More...
 
template<typename T >
std::enable_if< get_underlying
< T >::value, std::string >
::type 
to_string (const T &t)
 Get a string representation of t. More...
 

Detailed Description

Contains classes relating to the connectivity system.

Typedef Documentation

Decimals are implemented with an underlying 64bit int conforming to IEEE 754 decimal 64.

This struct only provides access to the 64 bit data, which can be accessed with a 64-bit decimal library in order to perform arithmetic or convert to / from strings.

Enumeration Type Documentation

The enumeration indicating the direction of message flow - towards the transport or towards the host.

Supports the 'less than' operator to allow its use in the key of a std::map, std::set, etc.

Enumerator
TOWARDS_HOST 

The direction of messages flowing towards the host (from the transport).

TOWARDS_TRANSPORT 

The direction of messages flowing towards the transport (from the host).

Function Documentation

template<typename V >
V::result_type com::softwareag::connectivity::apply_visitor ( const V &  v,
data_t &  t 
)
inline

Apply a visitor (using the boost::static_visitor pattern) to the given data_t.

This is the main mechanism for accessing the data if you don't know which type. Your visitor should implement operator() for each of the possible contained types and the appropriate method will be called, depending on which type is in the variant. If the variant is empty then the 0-args operator() will be used.

The return value of the operators will be returned from this method. Visitors must define a result_type member (or make use of boost::static_visitor, which provides this). Alternatively connectivity::visitor may be used when you only need to implement specific type visitation which also provides result_type.

template<typename V >
V::result_type com::softwareag::connectivity::apply_visitor ( const V &  v,
const data_t &  t 
)
inline

Apply a visitor (using the boost::static_visitor pattern) to the given data_t.

This is the main mechanism for accessing the data if you don't know which type. Your visitor should implement operator() for each of the possible contained types and the appropriate method will be called, depending on which type is in the variant. If the variant is empty then the 0-args operator() will be used.

The return value of the operators will be returned from this method. Visitors must define a result_type member (or make use of boost::static_visitor, which provides this). Alternatively connectivity::visitor may be used when you only need to implement specific type visitation which also provides result_type.

template<typename T >
T com::softwareag::connectivity::convert_to ( const data_t &  d)
inline

Get a T from a data_t, parsing it from a string if necessary/possible.

If it cannot be converted, or is not either T or a string, then will throw std::runtime_error.

Only the following types can be used with convert_to:

  • int64_t
  • double
  • bool
  • std::string
template<typename T >
get_details::GetVisitor<const T>::result_type com::softwareag::connectivity::get ( const data_t &  t)
inline

Get the contents of a data_t, given the type.

This is the primary way of accessing the contents of a data_t if you know which type it will be.

get is templated over one of the types the data_t can contain. If the data_t contains a value of that type then it will be returned. If not, get will throw std::runtime_error.

template<typename T >
get_details::GetVisitor<T>::result_type com::softwareag::connectivity::get ( data_t &  t)
inline

Get the contents of a data_t, given the type.

This is the primary way of accessing the contents of a data_t if you know which type it will be.

get is templated over one of the types the data_t can contain. If the data_t contains a value of that type then it will be returned. If not, get will throw std::runtime_error.

template<>
const data_t& com::softwareag::connectivity::get< const data_t & > ( const data_t &  t)
inline

Specialization to be a pass-through, for use in a templated context.

template<>
data_t& com::softwareag::connectivity::get< data_t & > ( data_t &  t)
inline

Specialization to be a pass-through, for use in a templated context.

template<typename T >
get_details::GetVisitor<custom_t<T> >::result_type com::softwareag::connectivity::get_custom ( data_t &  t)
inline

Get the contents of the data_t as a typed custom_t.

This is a shorthand for using get:

get_custom<T>(data) == get<custom_t<T> >(data)

template<typename T >
get_details::GetVisitor<const custom_t<T> >::result_type com::softwareag::connectivity::get_custom ( const data_t &  t)
inline

Get the contents of the data_t as a typed custom_t.

This is a shorthand for using get:

get_custom<T>(data) == get<custom_t<T> >(data)

template<typename T >
std::enable_if<get_underlying<T>::value, std::string>::type com::softwareag::connectivity::to_string ( const T &  t)
inline

Get a string representation of t.

Supports data_t, map_t and list_t. Intended only for logging, not performant.