B2BITS FIX Antenna C++  2.27.0
Public Member Functions | Static Public Member Functions | Friends | List of all members
Engine::MessageStorageType Class Reference

Object representing FA's message storage. More...

#include <B2BITS_PubEngineDefines.h>

Public Member Functions

 MessageStorageType ()
 Creates invalid storage type by default. More...
 
std::string name () const
 Get the string representation of storage type. More...
 
 operator std::size_t () const
 Implicit int conversion. More...
 

Static Public Member Functions

static MessageStorageType builtin (BuiltinMessageStorage::T bmst)
 Create the instance of classic builtin storage type. More...
 
static MessageStorageType custom ()
 Get the copy of custom_storageType value. More...
 
static MessageStorageType default_ ()
 Get the copy of default_storageType value. More...
 
static MessageStorageType invalid ()
 Get the copy of invalid_storageType value. More...
 
static MessageStorageType named (std::string const &name)
 Create the instance of dynamic new storage type. More...
 
static MessageStorageType total ()
 Get the copy of total_storageType value. More...
 
static std::size_t totalCount ()
 Get the total number of registered storages. More...
 

Friends

V12_API bool operator!= (MessageStorageType const &lhs, MessageStorageType const &rhs)
 
V12_API bool operator!= (MessageStorageType const &lhs, int const &rhs)
 
V12_API bool operator!= (int const &lhs, MessageStorageType const &rhs)
 
V12_API MessageStorageTypeoperator++ (MessageStorageType &rhs)
 Pre-increment operator. More...
 
V12_API MessageStorageType operator++ (MessageStorageType &lhs, int)
 Post-increment operator. More...
 
V12_API MessageStorageTypeoperator-- (MessageStorageType &rhs)
 Pre-decrement operator. More...
 
V12_API MessageStorageType operator-- (MessageStorageType &lhs, int)
 Post-decrement operator. More...
 
V12_API bool operator< (MessageStorageType const &lhs, MessageStorageType const &rhs)
 
V12_API bool operator<= (MessageStorageType const &lhs, MessageStorageType const &rhs)
 
V12_API bool operator== (MessageStorageType const &lhs, MessageStorageType const &rhs)
 
V12_API bool operator== (MessageStorageType const &lhs, int const &rhs)
 
V12_API bool operator== (int const &lhs, MessageStorageType const &rhs)
 
V12_API bool operator> (MessageStorageType const &lhs, MessageStorageType const &rhs)
 
V12_API bool operator>= (MessageStorageType const &lhs, MessageStorageType const &rhs)
 
V12_API void swap (MessageStorageType &lhs, MessageStorageType &rhs)
 swap() as a free function with ADL and non-throwing guarantee. More...
 

Detailed Description

Object representing FA's message storage.

Warning
Don't initialize instances of this class during static initialization or you will encounter an undefined behavior.
This class is deprecated. Use StorageMgr instead.

Constructor & Destructor Documentation

◆ MessageStorageType()

Engine::MessageStorageType::MessageStorageType ( )
inline

Creates invalid storage type by default.

Member Function Documentation

◆ builtin()

static MessageStorageType Engine::MessageStorageType::builtin ( BuiltinMessageStorage::T  bmst)
static

Create the instance of classic builtin storage type.

Instantiates new object representing builtin FIX Antenna's storage type. This is a special function. Use predefined constant object representing storage types instead.

Exceptions
Utils::ExceptionWhen unsupported storage type specified.
Parameters
[in]bmstEngine::BuiltinMessageStorage::BuiltinMessageStorageType enumerated value to instantiate new object of MessageStorageType.
Returns
New instance of MessageStorageType representing built-in message storage type of FIX Antenna.

◆ custom()

static MessageStorageType Engine::MessageStorageType::custom ( )
static

Get the copy of custom_storageType value.

Returns
New instance of MessageStorageType representing built-in message storage type of FIX Antenna

◆ default_()

static MessageStorageType Engine::MessageStorageType::default_ ( )
static

Get the copy of default_storageType value.

Returns
New instance of MessageStorageType representing built-in message storage type of FIX Antenna

◆ invalid()

static MessageStorageType Engine::MessageStorageType::invalid ( )
static

Get the copy of invalid_storageType value.

Returns
New instance of MessageStorageType representing special value - incorrectly specified storage.

◆ name()

std::string Engine::MessageStorageType::name ( ) const

Get the string representation of storage type.

Returns
Case-sensitive string identifier of current object representing storage.

◆ named()

static MessageStorageType Engine::MessageStorageType::named ( std::string const &  name)
static

Create the instance of dynamic new storage type.

Warning
The precondition for this action is initialized FIX Antenna's engine. Any kind of static initialization will lead to undefined behavior.
Exceptions
Utils::Exceptionin case the specified storage name is not registered.
Parameters
[in]namename of the built-in storage or name of dynamically loaded storage registered via StorageMgr.
Returns
New instance of MessageStorageType representing dynamically registered FIX Antenna's storage.

◆ operator std::size_t()

Engine::MessageStorageType::operator std::size_t ( ) const
inline

Implicit int conversion.

In case we work with total_storageType we suppose implicit int conversion is performed and return the total number of builtin storages (statically compiled into FIX Antenna). To get the access to all available storages (named storages included) you have to use total() function. This is done to avoid problems with static initialization.

Returns
Index number of the storage in storage list.

◆ total()

static MessageStorageType Engine::MessageStorageType::total ( )
static

Get the copy of total_storageType value.

Returns
New instance of MessageStorageType representing special value - total number of storage identifiers.

◆ totalCount()

static std::size_t Engine::MessageStorageType::totalCount ( )
static

Get the total number of registered storages.

Use this function to get the real number of storages registered in StorageMgr.

Warning
This function shall be used after FIXAntenna engine initialization.
Returns
Number of registered storages.

Friends And Related Function Documentation

◆ operator!= [1/3]

V12_API bool operator!= ( MessageStorageType const &  lhs,
MessageStorageType const &  rhs 
)
friend

◆ operator!= [2/3]

V12_API bool operator!= ( MessageStorageType const &  lhs,
int const &  rhs 
)
friend

◆ operator!= [3/3]

V12_API bool operator!= ( int const &  lhs,
MessageStorageType const &  rhs 
)
friend

◆ operator++ [1/2]

V12_API MessageStorageType& operator++ ( MessageStorageType rhs)
friend

Pre-increment operator.

Exceptions
Utils::ExceptionWhen the resulting value will be greater than total();

◆ operator++ [2/2]

V12_API MessageStorageType operator++ ( MessageStorageType lhs,
int   
)
friend

Post-increment operator.

Exceptions
Utils::ExceptionWhen the resulting value will be greater than total();

◆ operator-- [1/2]

V12_API MessageStorageType& operator-- ( MessageStorageType rhs)
friend

Pre-decrement operator.

Exceptions
Utils::ExceptionWhen the resulting value will be lesser than invalid();

◆ operator-- [2/2]

V12_API MessageStorageType operator-- ( MessageStorageType lhs,
int   
)
friend

Post-decrement operator.

Exceptions
Utils::ExceptionWhen the resulting value will be lesser than invalid();

◆ operator<

V12_API bool operator< ( MessageStorageType const &  lhs,
MessageStorageType const &  rhs 
)
friend

◆ operator<=

V12_API bool operator<= ( MessageStorageType const &  lhs,
MessageStorageType const &  rhs 
)
friend

◆ operator== [1/3]

V12_API bool operator== ( MessageStorageType const &  lhs,
MessageStorageType const &  rhs 
)
friend

◆ operator== [2/3]

V12_API bool operator== ( MessageStorageType const &  lhs,
int const &  rhs 
)
friend

◆ operator== [3/3]

V12_API bool operator== ( int const &  lhs,
MessageStorageType const &  rhs 
)
friend

◆ operator>

V12_API bool operator> ( MessageStorageType const &  lhs,
MessageStorageType const &  rhs 
)
friend

◆ operator>=

V12_API bool operator>= ( MessageStorageType const &  lhs,
MessageStorageType const &  rhs 
)
friend

◆ swap

V12_API void swap ( MessageStorageType lhs,
MessageStorageType rhs 
)
friend

swap() as a free function with ADL and non-throwing guarantee.