-
-
-inline void CopiedString_importString( CopiedString& self, const char* string ){
- self = string;
-}
-typedef ReferenceCaller<CopiedString, void(const char*), CopiedString_importString> CopiedStringImportStringCaller;
-inline void CopiedString_exportString( const CopiedString& self, const StringImportCallback& importer ){
- importer( self.c_str() );
-}
-typedef ConstReferenceCaller<CopiedString, void(const StringImportCallback&), CopiedString_exportString> CopiedStringExportStringCaller;
-
-inline void Bool_importString( bool& self, const char* string ){
- self = string_equal( string, "true" );
-}
-typedef ReferenceCaller<bool, void(const char*), Bool_importString> BoolImportStringCaller;
-inline void Bool_exportString( const bool& self, const StringImportCallback& importer ){
- importer( self ? "true" : "false" );
-}
-typedef ConstReferenceCaller<bool, void(const StringImportCallback&), Bool_exportString> BoolExportStringCaller;
-
-inline void Int_importString( int& self, const char* string ){
- if ( !string_parse_int( string, self ) ) {
- self = 0;
- }
-}
-typedef ReferenceCaller<int, void(const char*), Int_importString> IntImportStringCaller;
-inline void Int_exportString( const int& self, const StringImportCallback& importer ){
- char buffer[16];
- sprintf( buffer, "%d", self );
- importer( buffer );
-}
-typedef ConstReferenceCaller<int, void(const StringImportCallback&), Int_exportString> IntExportStringCaller;
-
-inline void Size_importString( std::size_t& self, const char* string ){
- int i;
- if ( string_parse_int( string, i ) && i >= 0 ) {
- self = i;
- }
- else
- {
- self = 0;