Initial Mapbase commit (squashed from mapbase-beta)

This commit is contained in:
Blixibon
2019-08-31 19:28:20 +00:00
parent 0d8dceea43
commit 3d464bc051
816 changed files with 105527 additions and 957 deletions

View File

@@ -70,6 +70,15 @@ public:
std::string *pString = (std::string *)fieldInfo.pField;
return pString->empty();
}
#ifdef MAPBASE
virtual bool Parse( const SaveRestoreFieldInfo_t &fieldInfo, char const* szValue )
{
std::string *pString = (std::string *)fieldInfo.pField;
pString->assign(szValue);
return true;
}
#endif
};
//-------------------------------------
@@ -85,4 +94,9 @@ inline ISaveRestoreOps *GetStdStringDataOps()
#define DEFINE_STDSTRING(name) \
{ FIELD_CUSTOM, #name, { offsetof(classNameTypedef,name), 0 }, 1, FTYPEDESC_SAVE, NULL, GetStdStringDataOps(), NULL }
#ifdef MAPBASE
#define DEFINE_KEYSTDSTRING(name,mapname) \
{ FIELD_CUSTOM, #name, { offsetof(classNameTypedef, name), 0 }, 1, FTYPEDESC_SAVE | FTYPEDESC_KEY, mapname, GetStdStringDataOps(), NULL }
#endif
#endif // STDSTRING_H