/* $Revision: 1 $ $Date: 6/11/04 21:49 $ Copyright © 2004, FSL Technologies Limited. Contact "http://fost3.fsltech.com". */ #ifndef FOST_YAML_HPP #define FOST_YAML_HPP #pragma once #ifdef F3UTIL_EXPORTS #define FOST_YAML_HPP_ARCHIVE L"$Archive: /FOST.3/F3Util/FOST.yaml.hpp $" #define FOST_YAML_HPP_REVISION L"$Revision: 1 $" #define FOST_YAML_HPP_DATE L"$Date: 6/11/04 21:49 $" #endif namespace FSLib { namespace YAML { class F3UTIL_DECLSPEC Record { public: Record &add( const wstring &name, t_null n = Null ); Record &add( const wstring &name, const wstring &value ); Record &add( const wstring &name, const Record &value ); template< typename T > Record &add( const wstring &name, const T &value ) { return add( name, toString( value ) ); } template< typename T > Record &add( const wstring &name, const Nullable< T > &value ) { if ( value.isnull() ) return add( name, Null ); else return add( name, toString( value.value() ) ); } std::wostream &printOn( std::wostream &o ) const; void log() const; private: std::list< std::pair< unsigned int, wstring > > m_content; }; } } namespace std { inline std::wostream &operator <<( std::wostream &o, const FSLib::YAML::Record &r ) { return r.printOn( o ); } } #endif // FOST_YAML_HPP /* $History: FOST.yaml.hpp $ * * ***************** Version 1 ***************** * User: Kirit Date: 6/11/04 Time: 21:49 * Created in $/FOST.3/F3Util * Added basics of new KPI based logging system. */