CrossFramework Library

XBase/StringTraits.hpp

説明を見る。
00001 
00006 #if defined(XBASE_INCLUDED_CHARTRAITS_HPP)
00007 #else
00008 #define XBASE_INCLUDED_CHARTRAITS_HPP
00009 
00010 //------------------------------------------------------------
00011 #include <cstdarg>
00012 #include <XBase/Bool.hpp>
00013 #include <XBase/BuiltInTypes.hpp>
00014 
00015 //------------------------------------------------------------
00016 namespace XBase {
00018 
00019 
00028     template< typename CharType >
00029     struct StringTraits
00030     {
00032         struct WriteResult
00033         {
00034             BoolPOD32 isSuccess; 
00035             pword_t   length;    
00036         };
00037 
00042         static pword_t Length( const CharType* aStr );
00043         
00048         static bool Equals( const CharType* aStrA , const CharType* aStrB );
00049 
00058         static const WriteResult NCopyStrict( CharType* aBuffer , pword_t aBufferLength , const CharType* aStr );
00059         
00070         static const WriteResult NCopy( CharType* aBuffer , pword_t aBufferLength , const CharType* aStr );
00071          
00080         static const WriteResult SNPrintfStrict( CharType* aBuffer , pword_t aBufferLength , const CharType* aFormat , ... );
00081 
00092         static const WriteResult SNPrintf( CharType* aBuffer , pword_t aBufferLength , const CharType* aFormat , ... );
00093          
00103         static const WriteResult VSNPrintfStrict( CharType* aBuffer , pword_t aBufferLength , const CharType* aFormat , va_list aArg );
00104 
00116         static const WriteResult VSNPrintf( CharType* aBuffer , pword_t aBufferLength , const CharType* aFormat , va_list aArg );
00117     };
00119 }
00120 //------------------------------------------------------------
00121 #endif
00122 // EOF
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 マクロ定義