Public Types | Public Member Functions | Private Attributes | Friends
FIX::Settings Class Reference

Internal representation of QuickFIX configuration settings. More...

#include <Settings.h>

List of all members.

Public Types

typedef std::vector< DictionarySections

Public Member Functions

Sections get (const std::string &name) const

Private Attributes

Sections m_sections

Friends

std::istream & operator>> (std::istream &, Settings &)

Detailed Description

Internal representation of QuickFIX configuration settings.

Definition at line 38 of file Settings.h.


Member Typedef Documentation

typedef std::vector< Dictionary > FIX::Settings::Sections

Definition at line 41 of file Settings.h.


Member Function Documentation

Settings::Sections FIX::Settings::get ( const std::string &  name) const

Definition at line 92 of file Settings.cpp.

References m_sections.

Referenced by FIX::operator>>().

{
  Sections sections;
  for ( Sections::size_type i = 0; i < m_sections.size(); ++i )
    if ( m_sections[ i ].getName() == name )
      sections.push_back( m_sections[ i ] );
  return sections;
}

Friends And Related Function Documentation

std::istream& operator>> ( std::istream &  ,
Settings  
) [friend]

Definition at line 64 of file Settings.cpp.

{
  char buffer[1024];
  std::string line;
  Settings::Sections::iterator section = s.m_sections.end();;

  while( stream.getline(buffer, 1024) )
  {
    line = string_strip( buffer );
    if( isComment(line) )
    {
      continue;
    }
    else if( isSection(line) )
    {
      section = s.m_sections.insert( s.m_sections.end(), Dictionary(splitSection(line)) );
    }
    else if( isKeyValue(line) )
    {
      std::pair<std::string, std::string> keyValue = splitKeyValue( line );
      if( section == s.m_sections.end() )
        continue;
      (*section).setString( keyValue.first, keyValue.second );
    }
  }
  return stream;
}

Member Data Documentation

Definition at line 47 of file Settings.h.

Referenced by get(), and FIX::operator>>().


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

Generated on Mon Sep 15 2014 01:23:57 for QuickFIX by doxygen 1.7.6.1 written by Dimitri van Heesch, © 1997-2001