AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.4.2
|
Provides a convenient way of building messages in FIX format, typically referenced using the typedefs AMPS::FIXBuilder or AMPS::NVFIXBuilder. More...
#include <ampsplusplus.hpp>
Public Member Functions | |
_FIXBuilder (char fieldSep_=(char) 1) | |
Construct an instance of _FIXBuilder, using the specified separator between fields. More... | |
void | append (const T &tag, const char *value, size_t offset, size_t length) |
Write a field with the provided tag and value to the message being constructed. More... | |
void | append (const T &tag, const std::string &value) |
Write a field with the provided tag and value to the message being constructed. More... | |
std::string | getString () const |
Returns the current contents of this builder as a string. More... | |
void | reset () |
Clear all data from the builder. | |
Provides a convenient way of building messages in FIX format, typically referenced using the typedefs AMPS::FIXBuilder or AMPS::NVFIXBuilder.
This builder simply writes to an underlying std::stringstream
as fields are added. It does not maintain a dictionary of key/value pairs or otherwise attempt to normalize or optimize the message. This also means that the builder is not validating, and does not prevent an application from producing FIX that is semantically invalid, is missing required fields, or that contains unexpected characters.
T | The type to accept for keys. This type must provide the << operator to write to a std::ostream . |
|
inline |
Construct an instance of _FIXBuilder, using the specified separator between fields.
fieldSep_ | separator to use between fields (defaults to 0x01) |
|
inline |
Write a field with the provided tag and value to the message being constructed.
tag | The tag to use for the field. |
value | A pointer to the memory that contains the value to use for the field. |
offset | The offset from value at which the value begins. |
length | The length of the value. |
|
inline |
Write a field with the provided tag and value to the message being constructed.
tag | The tag to use for the field. |
value | The value to use for the field. |
|
inline |
Returns the current contents of this builder as a string.