47 #include "FieldDefBase.h" 49 void Wtx::Dbo::TableDef::push_back( FieldDefBase & fd )
51 m_fieldDefs.push_back( &fd );
56 for(
auto fieldDef : fieldDefs() )
57 if( fieldName == std::string( fieldDef-> fieldName() ) )
63 std::string Wtx::Dbo::TableDef::toJson()
const 67 retVal +=
"{ \"tableDef\": {\n";
69 retVal +=
" \"tableName\": \"" + std::string(tableName()) +
"\"";
71 retVal +=
",\n \"fieldDefs\": [";
74 for(
auto fieldDef : fieldDefs() )
78 retVal +=
"\n " + fieldDef-> toJson();