fix8
version 1.4.0
Open Source C++ FIX Framework
|
A collection of FieldTraits for a message. Which fields are required, which are present. More...
#include <traits.hpp>
Public Member Functions | |
template<typename InputIterator > | |
FieldTraits (const InputIterator begin, const size_t cnt, const FieldTrait_Hash_Array *ftha) | |
FieldTraits () | |
Ctor. More... | |
bool | has (const unsigned short field, Presence::const_iterator &itr) const |
bool | has (const unsigned short field) const |
unsigned | getval (const unsigned short field) |
size_t | size () const |
bool | get (const unsigned short field, FieldTrait::TraitTypes type=FieldTrait::present) const |
bool | get (const unsigned short field, Presence::const_iterator &itr, FieldTrait::TraitTypes type) const |
unsigned short | find_missing (FieldTrait::TraitTypes type=FieldTrait::mandatory) const |
void | set (const unsigned short field, Presence::const_iterator &itr, FieldTrait::TraitTypes type) |
void | set (const unsigned short field, FieldTrait::TraitTypes type=FieldTrait::present) |
void | clear (const unsigned short field, Presence::const_iterator &itr, FieldTrait::TraitTypes type=FieldTrait::present) |
void | clear (const unsigned short field, FieldTrait::TraitTypes type=FieldTrait::present) |
bool | add (const FieldTrait &what) |
template<typename InputIterator > | |
void | add (const InputIterator begin, const size_t cnt) |
void | clear_flag (FieldTrait::TraitTypes type=FieldTrait::present) |
bool | is_present (const unsigned short field) const |
bool | is_mandatory (const unsigned short field) const |
bool | is_group (const unsigned short field, Presence::const_iterator &itr) const |
bool | is_group (const unsigned short field) const |
bool | is_component (const unsigned short field) const |
unsigned short | getComp (const unsigned short field, Presence::const_iterator &itr) const |
unsigned short | getComp (const unsigned short field) const |
unsigned short | getPos (const unsigned short field, Presence::const_iterator &itr) const |
unsigned short | getPos (const unsigned short field) const |
const Presence & | get_presence () const |
Private Attributes | |
Presence | _presence |
Friends | |
F8API std::ostream & | operator<< (std::ostream &os, const FieldTraits &what) |
A collection of FieldTraits for a message. Which fields are required, which are present.
Definition at line 437 of file traits.hpp.
|
inline |
Ctor.
InputIterator | input iterator to construct from |
begin | start iterator to input |
cnt | number of elements to input |
ftha | field trait hash array |
Definition at line 448 of file traits.hpp.
|
inline |
|
inline |
Add a FieldTrait.
what | TraitType to add |
Definition at line 575 of file traits.hpp.
References FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::insert().
Referenced by FIX8::MessageBase::add_trait(), parse_groups(), and process_message_fields().
|
inline |
Add from a range of traits.
begin | start iterator to input |
cnt | number of elements to input |
Definition at line 581 of file traits.hpp.
References FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::insert().
|
inline |
Clear a trait for a specified field.
field | to set |
itr | hint iterator: if end, set to itr of found element, if not end use it to locate element |
type | TraitType to set (default present) |
Definition at line 550 of file traits.hpp.
References FIX8::FieldTrait::_field_traits, FIX8::ebitset< T, B >::clear(), FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), and FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find().
Referenced by process_special_traits().
|
inline |
Clear a trait for a specified field.
field | to set |
type | TraitType to set (default present) |
Definition at line 565 of file traits.hpp.
References FIX8::FieldTrait::_field_traits, FIX8::ebitset< T, B >::clear(), FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), and FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find().
|
inline |
Clear a trait from all traits.
type | TraitType to clear |
Definition at line 585 of file traits.hpp.
References FIX8::FieldTrait::_field_traits, FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::begin(), FIX8::ebitset< T, B >::clear(), and FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end().
Referenced by FIX8::MessageBase::clear().
|
inline |
Find the first field that does not have the specified trait.
type | TraitType to check (default mandatory) |
Definition at line 512 of file traits.hpp.
References FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::begin(), FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), and FIX8::FieldTrait::present.
|
inline |
Check if a field has a specified trait.
field | to check |
type | TraitType to check (default present) |
Definition at line 490 of file traits.hpp.
References FIX8::FieldTrait::_field_traits, FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find(), and FIX8::ebitset< T, B >::has().
Referenced by FIX8::MessageBase::add_field(), FIX8::MessageBase::copy_legal(), FIX8::MessageBase::has(), FIX8::MessageBase::have(), and FIX8::MessageBase::move_legal().
|
inline |
Check if a field has a specified trait.
field | to check |
itr | hint iterator: if end, set to itr of found element, if not end use it to locate element |
type | TraitType to check (default present) |
Definition at line 501 of file traits.hpp.
References FIX8::FieldTrait::_field_traits, FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find(), and FIX8::ebitset< T, B >::has().
|
inline |
Get the Presence set
Definition at line 658 of file traits.hpp.
References _presence.
Referenced by FIX8::MessageBase::add_field(), FIX8::MessageBase::copy_legal(), FIX8::ConsoleMenu::EditMsg(), generate_group_bodies(), generate_group_traits(), group_hash(), FIX8::operator<<(), and FIX8::ConsoleMenu::SelectField().
|
inline |
Get the field component index of a specified field.
field | field to get |
itr | hint iterator: if end, set to itr of found element, if not end use it to locate element |
Definition at line 618 of file traits.hpp.
References FIX8::FieldTrait::_component, FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), and FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find().
|
inline |
Get the field component index of a specified field.
field | field to get |
Definition at line 629 of file traits.hpp.
References FIX8::FieldTrait::_component, FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), and FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find().
|
inline |
Get the field position of a specified field.
field | field to get |
itr | hint iterator: if end, set to itr of found element, if not end use it to locate element |
Definition at line 639 of file traits.hpp.
References FIX8::FieldTrait::_field_traits, FIX8::FieldTrait::_pos, FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find(), FIX8::ebitset< T, B >::has(), and FIX8::FieldTrait::position.
Referenced by FIX8::MessageBase::add_field(), and FIX8::MessageBase::getPos().
|
inline |
Get the field position of a specified field.
field | field to get |
Definition at line 650 of file traits.hpp.
References FIX8::FieldTrait::_field_traits, FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find(), FIX8::ebitset< T, B >::has(), and FIX8::FieldTrait::position.
|
inline |
Get the traits for a field.
field | to get |
Definition at line 476 of file traits.hpp.
References FIX8::FieldTrait::_field_traits, FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find(), and FIX8::ebitset< T, B >::get().
|
inline |
Check if a field is present
field | to check |
itr | hint iterator: set to itr of found element |
Definition at line 457 of file traits.hpp.
References FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), and FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find().
Referenced by FIX8::MessageBase::add_field(), FIX8::MessageBase::copy_legal(), FIX8::MessageBase::is_legal(), and FIX8::MessageBase::move_legal().
|
inline |
Check if a field is present
field | to check |
Definition at line 467 of file traits.hpp.
References FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), and FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find().
|
inline |
Check if a specified field has the component bit set (is a component).
field | field to check |
Definition at line 612 of file traits.hpp.
References FIX8::FieldTrait::component.
|
inline |
Check if a specified field has the group bit set (is a group).
field | field to check |
itr | hint iterator: if end, set to itr of found element, if not end use it to locate element |
Definition at line 602 of file traits.hpp.
References FIX8::FieldTrait::group.
Referenced by FIX8::ConsoleMenu::EditMsg().
|
inline |
Check if a specified field has the group bit set (is a group).
field | field to check |
Definition at line 607 of file traits.hpp.
References FIX8::FieldTrait::group.
|
inline |
Check if a specified field has the mandator bit set.
field | field to check |
Definition at line 596 of file traits.hpp.
References FIX8::FieldTrait::mandatory.
Referenced by FIX8::ConsoleMenu::SelectField().
|
inline |
Check if a specified field has the present bit set (is present).
field | field to check |
Definition at line 591 of file traits.hpp.
References FIX8::FieldTrait::present.
|
inline |
Set a trait for a specified field.
field | to set |
itr | hint iterator: if end, set to itr of found element, if not end use it to locate element |
type | TraitType to set (default present) |
Definition at line 524 of file traits.hpp.
References FIX8::FieldTrait::_field_traits, FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find(), and FIX8::ebitset< T, B >::set().
Referenced by FIX8::MessageBase::add_field(), process_special_traits(), FIX8::MessageBase::set(), and FIX8::Message::setup_reuse().
|
inline |
Set a trait for a specified field.
field | to set |
type | TraitType to set (default present) |
Definition at line 539 of file traits.hpp.
References FIX8::FieldTrait::_field_traits, FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::end(), FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::find(), and FIX8::ebitset< T, B >::set().
|
inline |
Get the number of possible fields
Definition at line 484 of file traits.hpp.
References FIX8::presorted_set< unsigned short, FieldTrait, FieldTrait::Compare >::size().
Referenced by FIX8::MessageBase::size().
|
friend |
|
private |
Definition at line 439 of file traits.hpp.
Referenced by get_presence().