OnixS C++ CME iLink 3 Binary Order Entry Handler 1.18.9
API Documentation
Loading...
Searching...
No Matches
TcpDirectAttr Class Reference

Public Member Functions

 TcpDirectAttr ()
 ~TcpDirectAttr ()
 TcpDirectAttr (const TcpDirectAttr &other)
TcpDirectAttroperator= (const TcpDirectAttr &other)
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 TcpDirectStack

Detailed Description

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

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

Definition at line 44 of file TcpDirectAttr.h.

Constructor & Destructor Documentation

◆ TcpDirectAttr() [1/2]

Allocates an attribute object.

Exceptions
std::bad_allocif memory could not be allocated.
std::runtime_errorif the ZF_ATTR environment variable is malformed.

◆ ~TcpDirectAttr()

◆ TcpDirectAttr() [2/2]

TcpDirectAttr ( const TcpDirectAttr & other)

Member Function Documentation

◆ getInt()

int64_t getInt ( const std::string & name)

Gets an integer attribute.

Parameters
nameName of the attribute.
Exceptions
std::logic_errorIf name is not a valid attribute name or if name does not have an integer type.

◆ getString()

std::string getString ( const std::string & name)

Gets a string attribute.

Parameters
nameName of the attribute.
Exceptions
std::logic_errorIf name is not a valid attribute name or if name does not have a string type.

◆ operator=()

TcpDirectAttr & operator= ( const TcpDirectAttr & other)

◆ set() [1/2]

void set ( const std::string & name,
const std::string & value )

Sets the attribute to the given value.

Parameters
nameName of the attribute.
valueNew value for the attribute (may be NULL).
Exceptions
std::logic_errorIf name is not a valid attribute name or if the attribute is not a string attribute.

◆ set() [2/2]

void set ( const std::string & name,
uint64_t value )

Sets the attribute to the given value.

Parameters
nameName of the attribute.
valueNew value for the attribute.
Exceptions
std::logic_errorIf name is not a valid attribute name.
std::domain_errorIf value is not within the range of values this attribute can take.

◆ TcpDirectStack

friend class TcpDirectStack
friend

Definition at line 99 of file TcpDirectAttr.h.