#include <utilities/mvc/string_collection.h>
Public Member Functions | |
| virtual std::size_t | GetCount (void)=0 |
| virtual const char * | GetStringName (std::size_t i)=0 |
| virtual const char * | GetValueAsString (const char *StringName)=0 |
| virtual int | GetValueAsInteger (const char *StringName) |
| virtual double | GetValueAsFloat (const char *StringName) |
| virtual const char * | GetValueAsString (std::size_t i) |
| virtual int | GetValueAsInteger (std::size_t i) |
| virtual double | GetValueAsFloat (std::size_t i) |
Class provides string collection access.
Definition at line 25 of file string_collection.h.
| virtual std::size_t nitro::StringCollection::GetCount | ( | void | ) | [pure virtual] |
Function returns count of the strings.
| nitro::exception | An exception of this type is thrown if the error occured. |
| virtual const char* nitro::StringCollection::GetStringName | ( | std::size_t | i | ) | [pure virtual] |
Function returns string's name.
| i | - Cursor of the string. |
| nitro::exception | An exception of this type is thrown if the error occured. |
Referenced by GetValueAsFloat(), GetValueAsInteger(), and GetValueAsString().
| double nitro::StringCollection::GetValueAsFloat | ( | std::size_t | i | ) | [virtual] |
Function returns specified string
| i | - String's cursor. |
| nitro::exception | An exception of this type is thrown if the error occured. |
Definition at line 77 of file string_collection.cpp.
References nitro::Converters::atof(), nitro::exception::code(), GetStringName(), GetValueAsString(), and nitro::exception::what().
{
try
{
return( nitro::Converters::atof( std::string( GetValueAsString( GetStringName( i ) ) ) ) );
}
catch( nitro::exception e )
{
throw( nitro::exception( std::string( "StringCollection::GetValueAsFloat( std::size_t i )::" )+ e.what() , e.code() ) );
}
catch( ... )
{
throw( nitro::exception( "StringCollection::GetValueAsFloat( std::size_t i )::An error occured" , 1 ) );
}
}

| double nitro::StringCollection::GetValueAsFloat | ( | const char * | StringName | ) | [virtual] |
Function returns specified string.
| StringName | - String's name. |
| nitro::exception | An exception of this type is thrown if the error occured. |
Definition at line 29 of file string_collection.cpp.
References nitro::Converters::atof(), nitro::exception::code(), GetValueAsString(), and nitro::exception::what().
{
try
{
return( nitro::Converters::atof( std::string( GetValueAsString( StringName ) ) ) );
}
catch( nitro::exception e )
{
throw( nitro::exception( std::string( "StringCollection::GetValueAsFloat( const char * StringName )::" )+ e.what() , e.code() ) );
}
catch( ... )
{
throw( nitro::exception( "StringCollection::GetValueAsFloat( const char * StringName )::An error occured" , 1 ) );
}
}

| int nitro::StringCollection::GetValueAsInteger | ( | const char * | StringName | ) | [virtual] |
Function returns specified string.
| StringName | - String's name. |
| nitro::exception | An exception of this type is thrown if the error occured. |
Definition at line 13 of file string_collection.cpp.
References nitro::Converters::atoi(), nitro::exception::code(), GetValueAsString(), and nitro::exception::what().
{
try
{
return( nitro::Converters::atoi( std::string( GetValueAsString( StringName ) ) ) );
}
catch( nitro::exception e )
{
throw( nitro::exception( std::string( "StringCollection::GetValueAsInteger( const char * StringName )::" )+ e.what() , e.code() ) );
}
catch( ... )
{
throw( nitro::exception( "StringCollection::GetValueAsInteger( const char * StringName )::An error occured" , 1 ) );
}
}

| int nitro::StringCollection::GetValueAsInteger | ( | std::size_t | i | ) | [virtual] |
Function returns specified string
| i | - String's cursor. |
| nitro::exception | An exception of this type is thrown if the error occured. |
Definition at line 61 of file string_collection.cpp.
References nitro::Converters::atoi(), nitro::exception::code(), GetStringName(), GetValueAsString(), and nitro::exception::what().
{
try
{
return( nitro::Converters::atoi( std::string( GetValueAsString( GetStringName( i ) ) ) ) );
}
catch( nitro::exception e )
{
throw( nitro::exception( std::string( "StringCollection::GetStringValue( std::size_t i )::" )+ e.what() , e.code() ) );
}
catch( ... )
{
throw( nitro::exception( "StringCollection::GetStringValue( std::size_t i )::An error occured" , 1 ) );
}
}

| const char * nitro::StringCollection::GetValueAsString | ( | std::size_t | i | ) | [virtual] |
Function returns specified string
| i | - String's cursor. |
Definition at line 45 of file string_collection.cpp.
References nitro::exception::code(), GetStringName(), GetValueAsString(), and nitro::exception::what().
{
try
{
return( GetValueAsString( GetStringName( i ) ) );
}
catch( nitro::exception e )
{
throw( nitro::exception( std::string( "StringCollection::GetStringValue( std::size_t i )::" )+ e.what() , e.code() ) );
}
catch( ... )
{
throw( nitro::exception( "StringCollection::GetStringValue( std::size_t i )::An error occured" , 1 ) );
}
}

| virtual const char* nitro::StringCollection::GetValueAsString | ( | const char * | StringName | ) | [pure virtual] |
Function returns specified string.
| StringName | - String's name. |
| nitro::exception | An exception of this type is thrown if the error occured. |
Referenced by GetValueAsFloat(), GetValueAsInteger(), and GetValueAsString().
1.6.1