yangacer/BehaviorDB — Issue #7: Structure concept mapping
Author: yangacer
Created: 2011-10-16 13:36:03+00:00
State: open

Allow users to specify a data structure/data model concept for operating the BehaviorDB.
e.g.

using namespace BDB;

BehaviorDB bdb;
Struct::unorder_map umap_bdb(bdb, "map_name"...); // some configuration may required by the unorder_map
Struct::array array_bdb(bdb, "array_name", ...);

// To fetch data according to key
std::string value;
umap_bdb.get("key", &value);

// To aceess data via a sequnce number
array_bdb.write(0, value);
array_bdb.read(1, &value);

Note:

1. Different concepts can share the same BehaviorDB instance.
2. Schema of a concept is also worth of consideration.