dxFeed Graal CXX API
Loading...
Searching...
No Matches
dxfcpp::StringSymbol Struct Referencefinal

A helper wrapper class needed to pass heterogeneous string symbols using a container and convert them to internal Graal representation. More...

#include <StringSymbol.hpp>

Public Member Functions

 StringSymbol (const char *chars) noexcept
 Constructs StringSymbol from a char array.
 
 StringSymbol (std::string_view stringView) noexcept
 Constructs StringSymbol from a std::string_view.
 
void * toGraal () const noexcept
 Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
 
std::string toString () const noexcept
 Returns a string representation of the current object.
 

Static Public Member Functions

static void freeGraal (void *graalNative) noexcept
 Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
 

Detailed Description

A helper wrapper class needed to pass heterogeneous string symbols using a container and convert them to internal Graal representation.

The current implementation is suboptimal (by memory usage) and will be enhanced.

Constructor & Destructor Documentation

◆ StringSymbol() [1/2]

dxfcpp::StringSymbol::StringSymbol ( const char * chars)
inlinenoexcept

Constructs StringSymbol from a char array.

Parameters
charsThe array of chars

◆ StringSymbol() [2/2]

dxfcpp::StringSymbol::StringSymbol ( std::string_view stringView)
inlinenoexcept

Constructs StringSymbol from a std::string_view.

Parameters
stringViewThe string view

Member Function Documentation

◆ freeGraal()

void dxfcpp::StringSymbol::freeGraal ( void * graalNative)
staticnoexcept

Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).

Parameters
graalNativeThe pointer to the dxFeed Graal SDK structure.

◆ toGraal()

void * dxfcpp::StringSymbol::toGraal ( ) const
noexcept

Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).

Fills the dxFeed Graal SDK structure's fields by the data of the current entity (recursively if necessary). Returns the pointer to the filled structure.

Returns
The pointer to the filled dxFeed Graal SDK structure

◆ toString()

std::string dxfcpp::StringSymbol::toString ( ) const
inlinenoexcept

Returns a string representation of the current object.

Returns
a string representation