本文整理汇总了C++中TypeNode::name方法的典型用法代码示例。如果您正苦于以下问题:C++ TypeNode::name方法的具体用法?C++ TypeNode::name怎么用?C++ TypeNode::name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TypeNode
的用法示例。
在下文中一共展示了TypeNode::name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
init_python_api();
Py_InitModule("testmod", no_methods);
run_python_string("import server");
run_python_string("import testmod");
run_python_string("from atlas import Operation");
run_python_string("class settlerMind(server.Thing):\n"
" def look_operation(self, op): pass\n"
" def delete_operation(self, op):\n"
" return Operation('sight') + Operation('move')\n"
" def test_hook(self, ent): pass\n"
);
run_python_string("testmod.settlerMind=settlerMind");
TypeNode * tn = new TypeNode();
tn->name() = etype;
MindFactory * mf = MindFactory::instance();
mf->addMindType(etype, "testmod");
mf->newMind("1", 1, tn);
tn->name() = etype;
mf->newMind("2", 2, tn);
shutdown_python_api();
return 0;
}
示例2: main
int main()
{
TypeNode * tn = new TypeNode();
tn->name() = etype;
MindFactory * mf = MindFactory::instance();
mf->addMindType(etype, "testmod");
mf->newMind("1", 1, tn);
tn->name() = etype;
mf->newMind("2", 2, tn);
return 0;
}
示例3: main
int main()
{
World e("0", 0);
TypeNode type;
type.name() = "world";
e.setType(&type);
IGEntityExerciser ee(e);
assert(e.m_location.m_loc == 0);
// Throw an op of every type at the entity
ee.runOperations();
// Subscribe the entity to every class of op
std::set<std::string> opNames;
ee.addAllOperations(opNames);
// Throw an op of every type at the entity again now it is subscribed
ee.runOperations();
return 0;
}
示例4: value
void TypeNodeProvider::value(Atlas::Message::Element& value, const TypeNode& type) const
{
if (m_attribute_name == "name") {
value = type.name();
}
}