Classes | |
class | Database |
class | MySQLDatabase |
Class provides MySQL routine. More... | |
class | PGDatabase |
Class provides PostgreSQL routine. More... | |
class | CSVReadable |
Class allows reading records from CSV files. More... | |
class | CSVWritable |
Class allows writing records in CSV files. More... | |
class | CSVFile |
Class provides CSV files manipulation routine. More... | |
class | DynamicLibLoader |
~english Class for loading dynamic libraries. More... | |
class | INIFile |
Class allows reading data from INI files. More... | |
class | XMLTag |
Class represents an XML tag. More... | |
class | XMLFile |
Class hides some XMLTag methods. More... | |
class | DynamicLibManager |
Manager for working with dynamic libraries. More... | |
class | ObjectManagerBasic |
Class provides routine for storing of various objects. More... | |
class | ObjectManager |
Class provides routine for storing of various objects. More... | |
class | LocalObjectManager |
Class provides routine for storing of various objects. More... | |
class | DirectoryAbstraction |
Class for processing directories. More... | |
class | FileAbstraction |
Class for cross-platform file processing. More... | |
class | MutexAbstraction |
Class for thread sinchronization. More... | |
class | ProcessAbstraction |
Class provides processes manipulation routine. More... | |
class | TARFileHeader |
File header. More... | |
class | UnTARAbstraction |
Class for tar files manipulation. More... | |
class | ThreadAbstraction |
Class provides thread operating routine. More... | |
class | ZIPAbstraction |
Class for zip files manipulation. More... | |
class | UnZIPAbstraction |
Class for zip files manipulation. More... | |
class | Allocator |
Class for memory handling. More... | |
class | BinaryData |
Class allowes to store binary data. More... | |
class | DynamicArrayKeeper |
Class automatically deletes dynamic arrays. More... | |
class | DynamicObjectKeeper |
Class automatically deletes dynamic objects. More... | |
class | Directory |
Class provides directory manipulation algorithms. More... | |
class | exception |
Class of nitro library exception. More... | |
class | File |
Class provides file manipulation routine. More... | |
class | CollectFiles |
Functor adds path to file into array. More... | |
class | CollectNone |
This functor does nothing. More... | |
class | LogStream |
Logging class. More... | |
class | MemoryDescription |
class | MemoryHandler |
class | TopWindow |
class | Application |
class | MVC |
class | ExecuteCommandInterface |
class | CommandRedirections |
class | ViewInterface |
class | ControllerInterface |
class | ModelInterface |
class | StringCollection |
class | PluginInterface |
Class provides plugin creation routine. More... | |
class | Pointer |
class | PointerInterface |
class | SharedPointerInterface |
class | SharedPointer |
Shared pointer interface. More... | |
struct | MD5_CTX |
class | FSPath |
Class for path processing. More... | |
class | SUtils |
Different utilities for string processing. More... | |
class | Encoders |
Class for encoding/decoding algorithms. More... | |
class | Parsers |
Class with string parsing algorithms. More... | |
class | Converters |
Functions for string convertions. More... | |
class | TemplateEngine |
Template engine. More... | |
class | FunctionWrapper |
Class wrapps function call. More... | |
class | FunctionWrapper< void > |
class | MemberFunctionWrapper |
Class wrapps member-function call. More... | |
class | MemberFunctionWrapper< void > |
class | TypeConverter |
Universal converter. More... | |
class | Thread |
High level class provides thread operating routine. More... | |
class | Timer |
class | ZIPUtilities |
Archives processing routine. More... | |
Typedefs | |
typedef unsigned char | UC |
typedef unsigned short | UI |
typedef unsigned long | UINT4 |
typedef unsigned char * | POINTER |
Functions | |
std::size_t | CSV_FILE_READ_BUFFER_SIZE (1024) |
const std::size_t | START_FIELD (1) |
const std::size_t | READ_DATA (2) |
const std::size_t | END_QUOTED_FIELD (3) |
const std::size_t | ADD_FIELD (4) |
const std::size_t | TRY_READ_NEXT (5) |
const std::size_t | QUOTE_WAS_FOUND (6) |
const std::size_t | END_RECORD (7) |
const std::size_t | CSV_AUTO_ESCAPE (1) |
bool | IsTagName (std::string Lexemma) |
void | DispatchBuffer (const char *Buffer, std::vector< std::string > &Lexemmas, std::size_t BufferSize, std::list< nitro::BinaryData > &CDATA) |
DEFINE_RELEASE_FUNCTION (DynamicLibManager, Release, Manager) | |
DEFINE_RELEASING_DESTRUCTOR (DynamicLibManager, Release) | |
DEFINE_SQUARE_BRACE_OPERATOR_REF_LOCATOR (nitro::DynamicLibLoader, DynamicLibManager, Manager) | |
DEFINE_SQUARE_BRACE_OPERATOR_REF_CURSOR (nitro::DynamicLibLoader, DynamicLibManager, Manager) | |
ALIAS_FUNCTION_1 (FileAbstraction::DeleteFile, aliasDeleteFile, const char *) | |
ALIAS_FUNCTION_2 (FileAbstraction::RenameFile, aliasRenameFile, const char *, const char *) | |
ALLOCATOR_DLL_ENTITY Allocator * | GetAllocator (void) |
ALIAS_FUNCTION_2 (File::SaveBinDataToFile, tstSaveBinDataToFile, BinaryData, const char *) | |
ALIAS_FUNCTION_2 (File::LoadBinDataFromFile, tstLoadBinDataFromFile, BinaryData, const char *) | |
ALIAS_FUNCTION_1R (File::FileExists, aliasFileExists, const char *, bool) | |
ALIAS_FUNCTION_1 (File::ForceCreateFile, aliasForceCreateFile, const char *) | |
ALIAS_FUNCTION_1R (File::GetLastModified, aliasGetLastModified, const char *, tm) | |
template<class file_func_type , class directory_func_type > | |
void | WalkThroughDirectory (const std::string &FolderPath, file_func_type FileFunc, directory_func_type DirectoryFunc, const bool Recursive=true) |
template<class cont > | |
void | CollectFilesFromDirectory (const std::string &FolderPath, cont &c, const bool Recursive=true) |
template<class cont > | |
void | CollectDirectoriesFromDirectory (const std::string &FolderPath, cont &c, const bool Recursive=true) |
static LogStream | stdlog ("./system.log", SYNC_LOGGING) |
static LogStream | errorlog ("./error.log", ASYNC_LOGGING) |
MVC * | GetMainMVCObject (void) |
void | Encode (UC *output, UINT4 *input, std::size_t len) |
void | Decode (UINT4 *output, UC *input, UI len) |
void | MDTransformF (UINT4 s[4], UINT4 x[16]) |
void | MDTransformG (UINT4 s[4], UINT4 x[16]) |
void | MDTransformH (UINT4 s[4], UINT4 x[16]) |
void | MDTransformI (UINT4 s[4], UINT4 x[16]) |
void | MDTransform (UINT4 state[4], UC block[64]) |
void | MDUpdate (MD5_CTX *context, UC *input, std::size_t inputLen) |
void | MDFinal (UC digest[16], MD5_CTX *context) |
void | MDInit (MD5_CTX *Context) |
void * | HighLevelThreadFunction (void *Param) |
void * | _TimerWrapperFunction (void *Param) |
Variables | |
const std::size_t | FA_FILE_BEGIN = 0 |
const std::size_t | FA_FILE_CURRENT = 1 |
const std::size_t | FA_FILE_END = 2 |
const std::size_t | FA_FILE_BINARY = 1 |
const std::size_t | FA_FILE_TEXT = 2 |
const std::size_t | FA_FILE_READ = 4 |
const std::size_t | FA_FILE_WRITE = 8 |
const std::size_t | FA_FILE_APPEND = 16 |
const std::size_t | FA_FILE_TRUNCATE = 32 |
Allocator | DefaultAllocator |
const std::size_t | EXCEPTION_MESSAGE_LENGTH = 1024 |
static const std::size_t | ASYNC_LOGGING = 0 |
static const std::size_t | SYNC_LOGGING = 1 |
DLL_ENTITY MemoryHandler | StdMemoryHandler |
MVC | MainMVCObject |
static UC | PADDING [64] |
const std::size_t | OCTAL = 8 |
const std::size_t | DECIMAL = 10 |
const std::size_t | HEXADECIMAL = 16 |
typedef unsigned char* nitro::POINTER |
Definition at line 420 of file string_utilities.cpp.
typedef unsigned char nitro::UC |
Definition at line 417 of file string_utilities.cpp.
typedef unsigned short nitro::UI |
Definition at line 418 of file string_utilities.cpp.
typedef unsigned long nitro::UINT4 |
Definition at line 419 of file string_utilities.cpp.
void* nitro::_TimerWrapperFunction | ( | void * | Param | ) |
Timer function for the thread.
Definition at line 67 of file timer.cpp.
References nitro::Timer::Action(), nitro::Timer::Instant, nitro::Timer::Single, nitro::ThreadAbstraction::Sleep(), and nitro::Timer::Timeout.
{ Timer * TimerPtr( ( Timer * ) Param ); if( TimerPtr->Instant ) { TimerPtr->Action(); if( TimerPtr->Single ) { return( NULL ); } } for( ; true ; ) { ThreadAbstraction::Sleep( TimerPtr->Timeout ); TimerPtr->Action(); if( TimerPtr->Single ) { return( NULL ); } } }
const std::size_t nitro::ADD_FIELD | ( | 4 | ) |
Referenced by nitro::CSVFile::ReadRecord().
nitro::ALIAS_FUNCTION_1 | ( | FileAbstraction::DeleteFile | , | |
aliasDeleteFile | , | |||
const char * | ||||
) |
nitro::ALIAS_FUNCTION_1 | ( | File::ForceCreateFile | , | |
aliasForceCreateFile | , | |||
const char * | ||||
) |
nitro::ALIAS_FUNCTION_1R | ( | File::FileExists | , | |
aliasFileExists | , | |||
const char * | , | |||
bool | ||||
) |
nitro::ALIAS_FUNCTION_1R | ( | File::GetLastModified | , | |
aliasGetLastModified | , | |||
const char * | , | |||
tm | ||||
) |
nitro::ALIAS_FUNCTION_2 | ( | FileAbstraction::RenameFile | , | |
aliasRenameFile | , | |||
const char * | , | |||
const char * | ||||
) |
nitro::ALIAS_FUNCTION_2 | ( | File::SaveBinDataToFile | , | |
tstSaveBinDataToFile | , | |||
BinaryData | , | |||
const char * | ||||
) |
nitro::ALIAS_FUNCTION_2 | ( | File::LoadBinDataFromFile | , | |
tstLoadBinDataFromFile | , | |||
BinaryData | , | |||
const char * | ||||
) |
void nitro::CollectDirectoriesFromDirectory | ( | const std::string & | FolderPath, | |
cont & | c, | |||
const bool | Recursive = true | |||
) |
Function runs through all subdirectories directories and collect files.
FolderPath | - Path to the scanning directory. | |
c | - Контейнер. | |
Recursive | - If true then directories will be scanned recursively. |
nitro::exception | Throws an exception of that type with the error description. |
Definition at line 718 of file file_utilities.h.
References nitro::exception::code(), WalkThroughDirectory(), and nitro::exception::what().
{ try { nitro::WalkThroughDirectory( FolderPath , std::bind2nd( nitro::CollectNone< std::string , std::vector< std::string > >() , & c ) , std::bind2nd( nitro::CollectFiles< std::string , std::vector< std::string > >() , & c ) , Recursive ); } catch( nitro::exception e ) { throw( nitro::exception( std::string( "template< class cont >void CollectDirectoriesFromDirectory( const std::string & FolderPath , cont & c , const bool Recursive = true )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "template< class cont >void CollectDirectoriesFromDirectory( const std::string & FolderPath , cont & c , const bool Recursive = true )::An error occured" ) , 0 ) ); } }
void nitro::CollectFilesFromDirectory | ( | const std::string & | FolderPath, | |
cont & | c, | |||
const bool | Recursive = true | |||
) |
Function runs through all subdirectories directories and collect files.
FolderPath | - Path to the scanning directory. | |
c | - Контейнер. | |
Recursive | - If true then directories will be scanned recursively. |
nitro::exception | Throws an exception of that type with the error description. |
Definition at line 667 of file file_utilities.h.
References nitro::exception::code(), WalkThroughDirectory(), and nitro::exception::what().
Referenced by nitro::ZIPUtilities::ArchiveDirectory(), and nitro::MVC::LoadModules().
{ try { nitro::WalkThroughDirectory( FolderPath , std::bind2nd( nitro::CollectFiles< std::string , std::vector< std::string > >() , & c ) , std::bind2nd( nitro::CollectNone< std::string , std::vector< std::string > >() , & c ) , Recursive ); } catch( nitro::exception e ) { throw( nitro::exception( std::string( "template< class cont >void CollectFilesFromDirectory( const std::string & FolderPath , cont & c , const bool Recursive = true )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "template< class cont >void CollectFilesFromDirectory( const std::string & FolderPath , cont & c , const bool Recursive = true )::An error occured" ) , 0 ) ); } }
const std::size_t nitro::CSV_AUTO_ESCAPE | ( | 1 | ) |
Switching on automatic processing of two double quotes.
Referenced by nitro::CSVFile::AppendRecord(), and nitro::CSVFile::ReadRecord().
std::size_t nitro::CSV_FILE_READ_BUFFER_SIZE | ( | 1024 | ) |
Referenced by nitro::CSVFile::ReadRecord(), and nitro::CSVFile::SetReadBufferSize().
void nitro::Decode | ( | UINT4 * | output, | |
UC * | input, | |||
UI | len | |||
) |
Definition at line 508 of file string_utilities.cpp.
References nitro::exception::code(), and nitro::exception::what().
Referenced by MDTransform().
{ try { UI i, j; for (i = 0, j = 0; j < len; i++, j += 4) output[i] = ((UINT4)input[ j ]) | (((UINT4)input[j+1]) << 8) | (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); } catch( nitro::exception e ) { throw( nitro::exception( std::string( "Decode( UINT4 * output , UC * input , UI len )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "Decode( UINT4 * output , UC * input , UI len )::An error occured while encoding string to base64" ) , 1 ) ); } }
nitro::DEFINE_RELEASE_FUNCTION | ( | DynamicLibManager | , | |
Release | , | |||
Manager | ||||
) |
nitro::DEFINE_RELEASING_DESTRUCTOR | ( | DynamicLibManager | , | |
Release | ||||
) |
nitro::DEFINE_SQUARE_BRACE_OPERATOR_REF_CURSOR | ( | nitro::DynamicLibLoader | , | |
DynamicLibManager | , | |||
Manager | ||||
) |
nitro::DEFINE_SQUARE_BRACE_OPERATOR_REF_LOCATOR | ( | nitro::DynamicLibLoader | , | |
DynamicLibManager | , | |||
Manager | ||||
) |
void nitro::DispatchBuffer | ( | const char * | Buffer, | |
std::vector< std::string > & | Lexemmas, | |||
std::size_t | BufferSize, | |||
std::list< nitro::BinaryData > & | CDATA | |||
) |
This function dispatches buffer.
Buffer | - Buffer with an XML file. | |
Lexemmas | - Vector with tokens. | |
BufferSize | - Size of the dispatching buffer. | |
CDATA | - List of objects with binary data. |
nitro::exception | - An exception of that type is thrown if ahy error occured. |
Definition at line 464 of file xml.cpp.
References nitro::exception::code(), and nitro::exception::what().
Referenced by nitro::XMLFile::LoadXML(), and nitro::XMLFile::LoadXMLFromANSIString().
{ try { std::string str; bool ParamValue( false ); bool HeaderMustBeParsed( false ); if( BufferSize > 5 && strncmp( Buffer , "<?xml" , 5 ) == 0 ) { HeaderMustBeParsed = true; } for( std::size_t i( 0 ) ; i < BufferSize ; i++ ) { // проверяем а не пора ли уже обрабатывать заголовок if( BufferSize >= i + 2 && strncmp( Buffer + i , "?>" , 2 ) == 0 && HeaderMustBeParsed ) { // тут нам тупо надо вытащить кодировку, чтобы знать какую локаль ставить for( std::size_t j( 0 ) ; j < Lexemmas.size() ; j++ ) { if( Lexemmas[ j ] == "encoding" ) { setlocale( LC_CTYPE , ".1251" ); } } HeaderMustBeParsed = false; } // пытаемся обработать секцию CDATA if( strncmp( Buffer + i , "<![CDATA[" , 9 ) == 0 ) { const char * EndCDATA( strstr( Buffer + i + 9 , "]]>" ) ); if( EndCDATA == NULL ) { throw( nitro::exception( "Illegal XML Structure" , 1 ) ); } Lexemmas.push_back( std::string( "<![CDATA[" ) ); CDATA.push_back( BinaryData( Buffer + i + 9 , EndCDATA - Buffer - i - 9 ) ); i += EndCDATA - Buffer - 1 + 3; // обработка CDATA закончена continue; } // обрабатываем все остальные данные if( isalnum( ( unsigned char )Buffer[ i ] ) || Buffer[ i ] == ':' || Buffer[ i ] == '_' ) { str.push_back( Buffer[ i ] ); } else { if( Buffer[ i ] == '"' && !ParamValue ) { ParamValue = true; Lexemmas.push_back( "\"" ); continue; } if( str.size() && !ParamValue ) { Lexemmas.push_back( str ); str = ""; } if( isprint( Buffer[ i ] ) ) { if( ParamValue ) { if( Buffer[ i ] == '"' ) { Lexemmas.push_back( str ); ParamValue = false; str = "\""; Lexemmas.push_back( str ); str = ""; } else { str.push_back( Buffer[ i ] ); } } else { if( str.size() && Buffer[ i ] != ' ' ) { Lexemmas.push_back( str ); } if( Buffer[ i ] != ' ' && Buffer[ i ] != '\t' ) { str = Buffer[ i ]; Lexemmas.push_back( str ); } str = ""; } } } } if( ParamValue ) { throw( nitro::exception( "Illegal XML Structure" , 1 ) ); } } catch( nitro::exception e ) { throw( nitro::exception( std::string( "DispatchBuffer( const char * Buffer , std::vector< std::string > & Lexemmas , std::size_t BufferSize )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "DispatchBuffer( const char * Buffer , std::vector< std::string > & Lexemmas , std::size_t BufferSize )::An error occured" ) , 1 ) ); } }
void nitro::Encode | ( | UC * | output, | |
UINT4 * | input, | |||
std::size_t | len | |||
) |
Definition at line 483 of file string_utilities.cpp.
References nitro::exception::code(), and nitro::exception::what().
Referenced by MDFinal().
{ try { UI i, j; for (i = 0, j = 0; j < ( UI )len; i++, j += 4) { output[ j ] = (UC)(input[i] & 0xff); output[j+1] = (UC)((input[i] >> 8) & 0xff); output[j+2] = (UC)((input[i] >> 16) & 0xff); output[j+3] = (UC)((input[i] >> 24) & 0xff); } } catch( nitro::exception e ) { throw( nitro::exception( std::string( "Encode( UC * output , UINT4 * input , UI len )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "Encode( UC * output , UINT4 * input , UI len )::An error occured while encoding string to base64" ) , 1 ) ); } }
const std::size_t nitro::END_QUOTED_FIELD | ( | 3 | ) |
Referenced by nitro::CSVFile::ReadRecord().
const std::size_t nitro::END_RECORD | ( | 7 | ) |
Referenced by nitro::CSVFile::ReadRecord().
static LogStream nitro::errorlog | ( | "./error.log" | , | |
ASYNC_LOGGING | ||||
) | [static] |
ALLOCATOR_DLL_ENTITY Allocator * nitro::GetAllocator | ( | void | ) |
Function allocates memory block.
Referenced by nitro::SharedPointer< managed_type >::SharedPointer().
MVC_DLL_ENTITY MVC * nitro::GetMainMVCObject | ( | void | ) |
Function provides access to the main MVC object.
nitro::exception | - An exception of this type is thrown if the error occured. |
Referenced by nitro::Application::OnInit().
void* nitro::HighLevelThreadFunction | ( | void * | Param | ) |
Definition at line 27 of file thread.cpp.
Referenced by nitro::Thread::Run().
{ try { ( ( Thread * )Param )->ThreadFunction(); return( NULL ); } catch( nitro::exception e ) { } catch( ... ) { } return( NULL ); }
bool nitro::IsTagName | ( | std::string | Lexemma | ) |
Definition at line 15 of file xml.cpp.
Referenced by nitro::XMLTag::IsClosingTag(), nitro::XMLTag::LoadXML(), nitro::XMLFile::ParseHeader(), and nitro::XMLTag::ProcessAttributes().
{ if( isdigit( Lexemma[ 0 ] ) )return( false ); if( Lexemma == "/" )return( false ); for( size_t i( 0 ) ; i < Lexemma.size() ; i++ ) { if( isalnum( ( unsigned char )Lexemma[ i ] ) || Lexemma[ i ] == '_' || Lexemma[ i ] == ':' ) { // nop } else { return( false ); } } return( true ); }
void nitro::MDFinal | ( | UC | digest[16], | |
MD5_CTX * | context | |||
) |
Definition at line 687 of file string_utilities.cpp.
References nitro::exception::code(), nitro::MD5_CTX::count, Encode(), MDUpdate(), PADDING, nitro::MD5_CTX::state, and nitro::exception::what().
Referenced by nitro::Encoders::md5().
{ try { UC bits[ 8 ]; UI index , padLen; // Сохраняем число бит Encode( bits , context->count , 8 ); // Подбиваем до 56 по модулю 64 index = ( UI )( ( context->count[ 0 ] >> 3 ) & 0x3f ); padLen = ( index < 56 ) ? ( 56 - index ) : ( 120 - index ); MDUpdate( context , PADDING , padLen ); // Добавляем длину (перед подбивкой) MDUpdate( context , bits , 8 ); // Сохраняем состояние в цифровой строке Encode( digest , context->state , 16 ); // Обнуляем чувствительную информацию memset( ( POINTER )context , 0 , sizeof( * context ) ); } catch( nitro::exception e ) { throw( nitro::exception( std::string( "MDFinal( UC digest[ 16 ] , MD5_CTX * context )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "MDFinal( UC digest[ 16 ] , MD5_CTX * context )::An error occured while encoding string to base64" ) , 1 ) ); } }
void nitro::MDInit | ( | MD5_CTX * | Context | ) |
Definition at line 716 of file string_utilities.cpp.
References nitro::MD5_CTX::count, and nitro::MD5_CTX::state.
Referenced by nitro::Encoders::md5().
{
Context->count[ 0 ] = Context->count[ 1 ] = 0;
// Загрузка "магических" инициирующих констант .
Context->state[ 0 ] = 0x67452301;
Context->state[ 1 ] = 0xefcdab89;
Context->state[ 2 ] = 0x98badcfe;
Context->state[ 3 ] = 0x10325476;
}
void nitro::MDTransform | ( | UINT4 | state[4], | |
UC | block[64] | |||
) |
Definition at line 615 of file string_utilities.cpp.
References nitro::exception::code(), Decode(), MDTransformF(), MDTransformG(), MDTransformH(), MDTransformI(), and nitro::exception::what().
Referenced by MDUpdate().
{ try { UINT4 a = state[ 0 ] , b = state[ 1 ] , c = state[ 2 ] , d = state[ 3 ] , x[ 16 ]; Decode( x , block , 64 ); MDTransformF( state , x ); MDTransformG( state , x ); MDTransformH( state , x ); MDTransformI( state , x ); state[ 0 ] += a; state[ 1 ] += b; state[ 2 ] += c; state[ 3 ] += d; // Обнуляем чувствительную информацию memset( ( POINTER ) x , 0 , sizeof( x ) ); } catch( nitro::exception e ) { throw( nitro::exception( std::string( "MDTransform( UINT4 state[ 4 ] , UC block[ 64 ] )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "MDTransform( UINT4 state[ 4 ] , UC block[ 64 ] )::An error occured while encoding string to base64" ) , 1 ) ); } }
void nitro::MDTransformF | ( | UINT4 | s[4], | |
UINT4 | x[16] | |||
) |
Definition at line 530 of file string_utilities.cpp.
References FF, S11, S12, S13, and S14.
Referenced by MDTransform().
{ FF(s[0], s[1], s[2], s[3], x[ 0], S11, 0xd76aa478); // 1 FF(s[3], s[0], s[1], s[2], x[ 1], S12, 0xe8c7b756); // 2 FF(s[2], s[3], s[0], s[1], x[ 2], S13, 0x242070db); // 3 FF(s[1], s[2], s[3], s[0], x[ 3], S14, 0xc1bdceee); // 4 FF(s[0], s[1], s[2], s[3], x[ 4], S11, 0xf57c0faf); // 5 FF(s[3], s[0], s[1], s[2], x[ 5], S12, 0x4787c62a); // 6 FF(s[2], s[3], s[0], s[1], x[ 6], S13, 0xa8304613); // 7 FF(s[1], s[2], s[3], s[0], x[ 7], S14, 0xfd469501); // 8 FF(s[0], s[1], s[2], s[3], x[ 8], S11, 0x698098d8); // 9 FF(s[3], s[0], s[1], s[2], x[ 9], S12, 0x8b44f7af); // 10 FF(s[2], s[3], s[0], s[1], x[10], S13, 0xffff5bb1); // 11 FF(s[1], s[2], s[3], s[0], x[11], S14, 0x895cd7be); // 12 FF(s[0], s[1], s[2], s[3], x[12], S11, 0x6b901122); // 13 FF(s[3], s[0], s[1], s[2], x[13], S12, 0xfd987193); // 14 FF(s[2], s[3], s[0], s[1], x[14], S13, 0xa679438e); // 15 FF(s[1], s[2], s[3], s[0], x[15], S14, 0x49b40821); // 16 }
void nitro::MDTransformG | ( | UINT4 | s[4], | |
UINT4 | x[16] | |||
) |
Definition at line 551 of file string_utilities.cpp.
References GG, S21, S22, S23, and S24.
Referenced by MDTransform().
{ GG(s[0], s[1], s[2], s[3], x[ 1], S21, 0xf61e2562); // 17 GG(s[3], s[0], s[1], s[2], x[ 6], S22, 0xc040b340); // 18 GG(s[2], s[3], s[0], s[1], x[11], S23, 0x265e5a51); // 19 GG(s[1], s[2], s[3], s[0], x[ 0], S24, 0xe9b6c7aa); // 20 GG(s[0], s[1], s[2], s[3], x[ 5], S21, 0xd62f105d); // 21 GG(s[3], s[0], s[1], s[2], x[10], S22, 0x02441453); // 22 GG(s[2], s[3], s[0], s[1], x[15], S23, 0xd8a1e681); // 23 GG(s[1], s[2], s[3], s[0], x[ 4], S24, 0xe7d3fbc8); // 24 GG(s[0], s[1], s[2], s[3], x[ 9], S21, 0x21e1cde6); // 25 GG(s[3], s[0], s[1], s[2], x[14], S22, 0xc33707d6); // 26 GG(s[2], s[3], s[0], s[1], x[ 3], S23, 0xf4d50d87); // 27 GG(s[1], s[2], s[3], s[0], x[ 8], S24, 0x455a14ed); // 28 GG(s[0], s[1], s[2], s[3], x[13], S21, 0xa9e3e905); // 29 GG(s[3], s[0], s[1], s[2], x[ 2], S22, 0xfcefa3f8); // 30 GG(s[2], s[3], s[0], s[1], x[ 7], S23, 0x676f02d9); // 31 GG(s[1], s[2], s[3], s[0], x[12], S24, 0x8d2a4c8a); // 32 }
void nitro::MDTransformH | ( | UINT4 | s[4], | |
UINT4 | x[16] | |||
) |
Definition at line 572 of file string_utilities.cpp.
References HH, S31, S32, S33, and S34.
Referenced by MDTransform().
{ HH(s[0], s[1], s[2], s[3], x[ 5], S31, 0xfffa3942); // 33 HH(s[3], s[0], s[1], s[2], x[ 8], S32, 0x8771f681); // 34 HH(s[2], s[3], s[0], s[1], x[11], S33, 0x6d9d6122); // 35 HH(s[1], s[2], s[3], s[0], x[14], S34, 0xfde5380c); // 36 HH(s[0], s[1], s[2], s[3], x[ 1], S31, 0xa4beea44); // 37 HH(s[3], s[0], s[1], s[2], x[ 4], S32, 0x4bdecfa9); // 38 HH(s[2], s[3], s[0], s[1], x[ 7], S33, 0xf6bb4b60); // 39 HH(s[1], s[2], s[3], s[0], x[10], S34, 0xbebfbc70); // 40 HH(s[0], s[1], s[2], s[3], x[13], S31, 0x289b7ec6); // 41 HH(s[3], s[0], s[1], s[2], x[ 0], S32, 0xeaa127fa); // 42 HH(s[2], s[3], s[0], s[1], x[ 3], S33, 0xd4ef3085); // 43 HH(s[1], s[2], s[3], s[0], x[ 6], S34, 0x04881d05); // 44 HH(s[0], s[1], s[2], s[3], x[ 9], S31, 0xd9d4d039); // 45 HH(s[3], s[0], s[1], s[2], x[12], S32, 0xe6db99e5); // 46 HH(s[2], s[3], s[0], s[1], x[15], S33, 0x1fa27cf8); // 47 HH(s[1], s[2], s[3], s[0], x[ 2], S34, 0xc4ac5665); // 48 }
void nitro::MDTransformI | ( | UINT4 | s[4], | |
UINT4 | x[16] | |||
) |
Definition at line 593 of file string_utilities.cpp.
References II, S41, S42, S43, and S44.
Referenced by MDTransform().
{ II(s[0], s[1], s[2], s[3], x[ 0], S41, 0xf4292244); // 49 II(s[3], s[0], s[1], s[2], x[ 7], S42, 0x432aff97); // 50 II(s[2], s[3], s[0], s[1], x[14], S43, 0xab9423a7); // 51 II(s[1], s[2], s[3], s[0], x[ 5], S44, 0xfc93a039); // 52 II(s[0], s[1], s[2], s[3], x[12], S41, 0x655b59c3); // 53 II(s[3], s[0], s[1], s[2], x[ 3], S42, 0x8f0ccc92); // 54 II(s[2], s[3], s[0], s[1], x[10], S43, 0xffeff47d); // 55 II(s[1], s[2], s[3], s[0], x[ 1], S44, 0x85845dd1); // 56 II(s[0], s[1], s[2], s[3], x[ 8], S41, 0x6fa87e4f); // 57 II(s[3], s[0], s[1], s[2], x[15], S42, 0xfe2ce6e0); // 58 II(s[2], s[3], s[0], s[1], x[ 6], S43, 0xa3014314); // 59 II(s[1], s[2], s[3], s[0], x[13], S44, 0x4e0811a1); // 60 II(s[0], s[1], s[2], s[3], x[ 4], S41, 0xf7537e82); // 61 II(s[3], s[0], s[1], s[2], x[11], S42, 0xbd3af235); // 62 II(s[2], s[3], s[0], s[1], x[ 2], S43, 0x2ad7d2bb); // 63 II(s[1], s[2], s[3], s[0], x[ 9], S44, 0xeb86d391); // 64 }
void nitro::MDUpdate | ( | MD5_CTX * | context, | |
UC * | input, | |||
std::size_t | inputLen | |||
) |
Definition at line 646 of file string_utilities.cpp.
References nitro::MD5_CTX::buffer, nitro::exception::code(), nitro::MD5_CTX::count, MDTransform(), nitro::MD5_CTX::state, and nitro::exception::what().
Referenced by nitro::Encoders::md5(), and MDFinal().
{ try { UI index, partLen; std::size_t i; // Подсчитываем число байт по модулю 64. index = (UI)((context->count[0] >> 3) & 0x3F); // Модифицируем число бит. if ((context->count[0] += ((UINT4)inputLen << 3)) < ((UINT4)inputLen << 3)) context->count[1]++; context->count[1] += ((UINT4)inputLen >> 29); partLen = 64 - index; // Выполняем преобразование столько раз, сколько возможно. if( ( UI )inputLen >= partLen ) { memcpy( ( POINTER )&context->buffer[ index ] , ( POINTER )input , partLen ); MDTransform (context->state, context->buffer); for( i = partLen ; i + 63 < inputLen ; i += 64) MDTransform(context->state, &input[i]); index = 0; } else i = 0; // Ввод остатка буфера memcpy((POINTER)&context->buffer[index], (POINTER)&input[i],inputLen-i); } catch( nitro::exception e ) { throw( nitro::exception( std::string( "MDUpdate( MD5_CTX * context , UC * input , UI inputLen )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "MDUpdate( MD5_CTX * context , UC * input , UI inputLen ))::An error occured while encoding string to base64" ) , 1 ) ); } }
const std::size_t nitro::QUOTE_WAS_FOUND | ( | 6 | ) |
Referenced by nitro::CSVFile::ReadRecord().
const std::size_t nitro::READ_DATA | ( | 2 | ) |
Referenced by nitro::CSVFile::ReadRecord().
const std::size_t nitro::START_FIELD | ( | 1 | ) |
Referenced by nitro::CSVFile::ReadRecord().
static LogStream nitro::stdlog | ( | "./system.log" | , | |
SYNC_LOGGING | ||||
) | [static] |
const std::size_t nitro::TRY_READ_NEXT | ( | 5 | ) |
Referenced by nitro::CSVFile::ReadRecord().
void nitro::WalkThroughDirectory | ( | const std::string & | FolderPath, | |
file_func_type | FileFunc, | |||
directory_func_type | DirectoryFunc, | |||
const bool | Recursive = true | |||
) |
Function runs through all subdirectories directories.
FolderPath | - Path to the scanning directory. | |
FileFunc | - This function will be called for each founded file. | |
DirectoryFunc | - This function will be called for each directory. | |
Recursive | - If true then directories will be scanned recursively. |
nitro::exception | Throws an exception of that type with the error description. |
Definition at line 598 of file file_utilities.h.
References nitro::FSPath::AddEndSlash(), nitro::exception::code(), nitro::DirectoryAbstraction::FindFirst(), nitro::DirectoryAbstraction::FindNext(), nitro::DirectoryAbstraction::GetName(), nitro::DirectoryAbstraction::IsDirectory(), nitro::DirectoryAbstraction::IsDots(), and nitro::exception::what().
Referenced by CollectDirectoriesFromDirectory(), and CollectFilesFromDirectory().
{ try { nitro::DirectoryAbstraction FileFinder; std::size_t Again( FileFinder.FindFirst( FolderPath ) ); while( Again == 0 ) { if( FileFinder.IsDots() ) { Again = FileFinder.FindNext(); continue; } if( FileFinder.IsDirectory() ) { DirectoryFunc( nitro::FSPath::AddEndSlash( FolderPath ) + FileFinder.GetName() ); if( Recursive ) { WalkThroughDirectory( nitro::FSPath::AddEndSlash( FolderPath ) + FileFinder.GetName() , FileFunc , DirectoryFunc , Recursive ); } } else { FileFunc( nitro::FSPath::AddEndSlash( FolderPath ) + FileFinder.GetName() ); } Again = FileFinder.FindNext(); } } catch( nitro::exception e ) { throw( nitro::exception( std::string( "template< class file_func_type , class directory_func_type >void WalkThroughDirectory( const std::string & FolderPath , file_func_type FileFunc , directory_func_type DirectoryFunc , const bool Recursive = true )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "template< class file_func_type , class directory_func_type >void WalkThroughDirectory( const std::string & FolderPath , file_func_type FileFunc , directory_func_type DirectoryFunc , const bool Recursive = true )::An error occured" ) , 0 ) ); } }
const std::size_t nitro::ASYNC_LOGGING = 0 [static] |
Async logging.
Definition at line 47 of file log_stream.h.
const std::size_t nitro::DECIMAL = 10 |
Decimal conversion mode.
Definition at line 1855 of file string_utilities.h.
Referenced by nitro::Converters::atoi(), and nitro::Converters::itoa().
Allocator *ActiveAllocator & nitro::DefaultAllocator |
Definition at line 8 of file allocator.cpp.
const std::size_t nitro::EXCEPTION_MESSAGE_LENGTH = 1024 |
Definition at line 36 of file exception.h.
Referenced by nitro::exception::exception().
const std::size_t nitro::FA_FILE_APPEND = 16 |
Opening file for wroting and appending at the end of the file.
Definition at line 149 of file file_abstraction.h.
Referenced by nitro::FileAbstraction::Open(), and nitro::LogStream::Reset().
const std::size_t nitro::FA_FILE_BEGIN = 0 |
File cursor positioning modes. Cursor is set from the beginning of the file.
Definition at line 49 of file file_abstraction.h.
Referenced by nitro::CSVFile::AppendRecord(), nitro::File::FileSize(), nitro::UnTARAbstraction::GetCountOfFiles(), nitro::UnTARAbstraction::GotoFirstFile(), nitro::FileAbstraction::Open(), nitro::CSVFile::ReadRecord(), and nitro::FileAbstraction::Seek().
const std::size_t nitro::FA_FILE_BINARY = 1 |
Opening file in binary mode.
Definition at line 85 of file file_abstraction.h.
Referenced by nitro::File::ForceCreateFile(), nitro::UnTARAbstraction::OpenFile(), nitro::CSVFile::OpenFile(), nitro::LogStream::Reset(), nitro::File::SaveBinDataToFile(), nitro::XMLFile::SaveXML(), and nitro::UnZIPAbstraction::UnZIPFile().
const std::size_t nitro::FA_FILE_CURRENT = 1 |
File cursor positioning modes. Cursor is set from the current position of the cursor.
Definition at line 61 of file file_abstraction.h.
Referenced by nitro::UnTARAbstraction::GetCountOfFiles(), nitro::FileAbstraction::Seek(), and nitro::UnTARAbstraction::SetReadCursor().
const std::size_t nitro::FA_FILE_END = 2 |
File cursor positioning modes. Cursor is set from the end of the file.
Definition at line 73 of file file_abstraction.h.
Referenced by nitro::CSVFile::AppendRecord(), nitro::File::FileSize(), nitro::FileAbstraction::Open(), and nitro::FileAbstraction::Seek().
const std::size_t nitro::FA_FILE_READ = 4 |
Opening file for reading. File must exists.
Definition at line 117 of file file_abstraction.h.
Referenced by nitro::File::LoadBinDataFromFile(), nitro::FileAbstraction::Open(), nitro::UnTARAbstraction::OpenFile(), nitro::CSVFile::OpenFile(), and nitro::FileAbstraction::Read().
const std::size_t nitro::FA_FILE_TEXT = 2 |
Opening file in text mode.
Definition at line 101 of file file_abstraction.h.
const std::size_t nitro::FA_FILE_TRUNCATE = 32 |
File content will be deleted when it will be opend for reading or/and writing.
Definition at line 165 of file file_abstraction.h.
Referenced by nitro::FileAbstraction::Open(), nitro::File::SaveBinDataToFile(), nitro::XMLFile::SaveXML(), and nitro::UnZIPAbstraction::UnZIPFile().
const std::size_t nitro::FA_FILE_WRITE = 8 |
Opening file for writing.
Definition at line 133 of file file_abstraction.h.
Referenced by nitro::File::ForceCreateFile(), nitro::FileAbstraction::Open(), nitro::UnTARAbstraction::OpenFile(), nitro::CSVFile::OpenFile(), nitro::LogStream::Reset(), nitro::File::SaveBinDataToFile(), nitro::XMLFile::SaveXML(), nitro::UnZIPAbstraction::UnZIPFile(), and nitro::FileAbstraction::Write().
const std::size_t nitro::HEXADECIMAL = 16 |
Hexadecimal conversion mode.
Definition at line 1867 of file string_utilities.h.
Referenced by nitro::Converters::atoi(), and nitro::Converters::itoa().
Definition at line 556 of file mvc_core.cpp.
const std::size_t nitro::OCTAL = 8 |
Octal conversion mode.
Definition at line 1843 of file string_utilities.h.
Referenced by nitro::Converters::atoi(), nitro::UnTARAbstraction::ExtractFile(), nitro::UnTARAbstraction::GetCountOfFiles(), nitro::Converters::itoa(), and nitro::UnTARAbstraction::SetReadCursor().
UC nitro::PADDING[64] [static] |
{0x80 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 }
Definition at line 447 of file string_utilities.cpp.
Referenced by MDFinal().
Definition at line 118 of file memory_handler.cpp.
const std::size_t nitro::SYNC_LOGGING = 1 [static] |
Definition at line 59 of file log_stream.h.
Referenced by nitro::LogStream::Reset().