OnixS C++ FIX Engine  4.10.1
API Documentation
Attributes Class Reference

#include <OnixS/FIXEngine/FIX/TcpDirectAttr.h>

Public Member Functions

 Attributes ()
 
 ~Attributes ()
 
 Attributes (const Attributes &other)
 
Attributesoperator= (const Attributes &other)
 
void networkInterface (const std::string &ifName)
 
std::string getString (const std::string &name)
 
void set (const std::string &name, const std::string &value)
 
int64_t getInt (const std::string &name)
 
void set (const std::string &name, uint64_t value)
 

Friends

class Stack
 

Detailed Description

The default values for attributes may be overridden by setting the environment variable ZF_Attributes. For example:

1 ZF_Attributes="interface=enp4s0f0;log_level=3;reactor_spin_count=1"

Definition at line 40 of file TcpDirectAttr.h.

Constructor & Destructor Documentation

Allocate an attribute object.

Exceptions
Thestd::bad_alloc is thrown if the memory could not be allocated.
Thestd::runtime_error if the ZF_Attributes environment variable is malformed.
~Attributes ( )
Attributes ( const Attributes other)

Member Function Documentation

int64_t getInt ( const std::string &  name)

Gets the attribute value.

Parameters
nameThe name of the attribute.
Exceptions
Thestd::logic_error is thrown if the name is not a valid attribute name or if the name does not have an integer type.
std::string getString ( const std::string &  name)

Gets the attribute value.

Parameters
nameThe name of the attribute.
Exceptions
Thestd::logic_error is thrown if the name is not a valid attribute name or if the name does not have a string type.
void networkInterface ( const std::string &  ifName)
inline

Sets the network interface name.

Definition at line 57 of file TcpDirectAttr.h.

Attributes& operator= ( const Attributes other)
void set ( const std::string &  name,
const std::string &  value 
)

Sets an attribute to a string value.

Parameters
nameThe name of the attribute.
valueThe new value for the attribute.
Exceptions
Thestd::logic_error is thrown if the name is not a valid attribute name or if the attribute is not a string attribute.
void set ( const std::string &  name,
uint64_t  value 
)

Sets an attribute to an integer value.

Parameters
nameThe name of the attribute.
valueThe new value for the attribute.
Exceptions
Thestd::logic_error is thrown if the name is not a valid attribute name.
Thestd::domain_error is thrown if the value is not within the range of values this attribute can take.

Friends And Related Function Documentation

friend class Stack
friend

Definition at line 109 of file TcpDirectAttr.h.


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