llfix
Low-latency FIX engine
llfix::IncomingFixMessage Class Reference

Represents a parsed incoming FIX message. More...

#include <incoming_fix_message.h>

Public Member Functions

bool has_tag (uint32_t tag) const
 Checks whether a FIX tag exists and is valid. More...
 
bool has_repeating_group_tag (uint32_t tag) const
 Checks whether a repeating group tag exists. More...
 
std::string to_string () const
 Serialises the FIX message into a human-readable string. More...
 
template<typename T >
get_tag_value_as (uint32_t tag, std::size_t decimal_points=0) const
 Retrieves a FIX tag value converted to the requested type. More...
 
template<typename T >
get_repeating_group_tag_value_as (uint32_t tag, std::size_t index, std::size_t decimal_points=0) const
 Retrieves a repeating group tag value converted to the requested type. More...
 

Detailed Description

Represents a parsed incoming FIX message.

Always call has_tag() or has_repeating_group_tag() before accessing values.

Repeating groups are handled separately via IncomingFixRepeatingGroups and accessed through dedicated APIs.

Member Function Documentation

◆ get_repeating_group_tag_value_as()

template<typename T >
T llfix::IncomingFixMessage::get_repeating_group_tag_value_as ( uint32_t  tag,
std::size_t  index,
std::size_t  decimal_points = 0 
) const
inline

Retrieves a repeating group tag value converted to the requested type.

Template Parameters
TTarget return type.
Parameters
tagFIX tag number.
indexRepeating group index (0-based).
decimal_pointsNumber of decimal places (required for floating-point and FixedPoint).
Returns
Tag value converted to type T.
Note
Supported types:
  • std::string_view
  • std::string
  • char
  • bool
  • integral types
  • floating-point types
  • FixedPoint

◆ get_tag_value_as()

template<typename T >
T llfix::IncomingFixMessage::get_tag_value_as ( uint32_t  tag,
std::size_t  decimal_points = 0 
) const
inline

Retrieves a FIX tag value converted to the requested type.

Template Parameters
TTarget return type.
Parameters
tagFIX tag number.
decimal_pointsNumber of decimal points (required for floating-point and FixedPoint types).
Returns
Tag value converted to type T.
Note
Supported types:
  • std::string_view
  • std::string
  • char
  • bool
  • integral types
  • floating-point types
  • FixedPoint

◆ has_repeating_group_tag()

bool llfix::IncomingFixMessage::has_repeating_group_tag ( uint32_t  tag) const
inline

Checks whether a repeating group tag exists.

Parameters
tagFIX tag number belonging to a repeating group.
Returns
true if the tag exists in the repeating group storage, false otherwise.

◆ has_tag()

bool llfix::IncomingFixMessage::has_tag ( uint32_t  tag) const
inline

Checks whether a FIX tag exists and is valid.

Parameters
tagFIX tag number.
Returns
true if the tag exists, false otherwise.

◆ to_string()

std::string llfix::IncomingFixMessage::to_string ( ) const
inline

Serialises the FIX message into a human-readable string.

The output is formatted as:

  • Header fields first (8, 9, 35, 34, 49, 52, 56)
  • Body fields (excluding header and trailer)
  • Repeating group fields
  • Trailer field (10)

Fields are separated by the '|' character instead of SOH.

Returns
A string representation of the FIX message

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