示例#1
0
void InitializeAttributes()
{
    World* world = World::GetPtr();
    AttributeTable* attributes = new AttributeTable();

    world->AddProperty("attributes", (void*)attributes);
    world->events.AddCallback("Shutdown", CleanupAttributes);
}
示例#2
0
bool InitializeBoards()
{
#ifdef MODULE_BOARD
    World* world = World::GetPtr();
    BoardManager* bmanager = new BoardManager();

    world->WriteLog("Initializing boards.");
    world->AddState("boards", bmanager);
    world->commands.AddCommand(new CMDBoard());
    world->commands.AddCommand(new CMDABoard());
    world->AddProperty("boards", (void*)bmanager);
    world->events.AddCallback("Shutdown", CleanupBoards);
#endif
    return true;
}