// create an entity
// assign an attribute
ent.set_attribute( gamedb::Attribute( "String", gamedb::Value( new gamedb::ValueData_String( "Hello" ) ) ) );
// Attribute retreival
gamedb::Attribute attr_n = ent.get_attribute( "String" );
gamedb::Value val = attr_n.get_value();
gamedb::ValueData_String *vd = (gamedb::ValueData_String*)val.get_data();
std::cout << vd->get_data();
The ugliness of the setting/retreival will be hidden by helper functions, eventually. You will notice a couple of concepts in play here. First, we have Attribute. An attribute is a effectively a 'named' value. A Value is dynamically typed and must be assigned an instance of ValueData. I've made a few ValueData helpers, specifically those that handle the main native types (int, float, std::string, Function and DataEntity (eg: Entity).
This seems to work nicely (again, helpers will be nice), so tomorrow I can get on with the business of the 'database' side of it and get some simple queries running.