当前位置: 首页>>代码示例>>C++>>正文


C++ Anonymous::setName方法代码示例

本文整理汇总了C++中Anonymous::setName方法的典型用法代码示例。如果您正苦于以下问题:C++ Anonymous::setName方法的具体用法?C++ Anonymous::setName怎么用?C++ Anonymous::setName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Anonymous的用法示例。


在下文中一共展示了Anonymous::setName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: test_characterError_playable

void Playertest::test_characterError_playable()
{
    Player::playableTypes.insert("settler");

    Atlas::Objects::Operation::Create op;
    Anonymous description;
    description->setName("13e45264-e512-411b-9f8a-2e5cb6327c87");
    description->setParents(std::list<std::string>(1, "settler"));
    OpVector res;

    int result = m_account->characterError(op, description, res);

    ASSERT_EQUAL(result, 0);
    ASSERT_EQUAL(res.size(), 0u);
}
开发者ID:9cat,项目名称:cyphesis,代码行数:15,代码来源:Playertest.cpp

示例2: test_characterError_not_playable

void Playertest::test_characterError_not_playable()
{
    Player::playableTypes.insert("settler");

    Atlas::Objects::Operation::Create op;
    Anonymous description;
    description->setName("dfdd84f5-4708-4b6d-b418-f825d779efc0");
    description->setParents(std::list<std::string>(1, "goblin"));
    OpVector res;

    int result = m_account->characterError(op, description, res);

    ASSERT_NOT_EQUAL(result, 0);
    ASSERT_EQUAL(res.size(), 1u);
    ASSERT_EQUAL(res.front()->getClassNo(),
                 Atlas::Objects::Operation::ERROR_NO);
}
开发者ID:9cat,项目名称:cyphesis,代码行数:17,代码来源:Playertest.cpp

示例3: test_characterError_admin_name

void Playertest::test_characterError_admin_name()
{
    Player::playableTypes.insert("settler");

    Atlas::Objects::Operation::Create op;
    Anonymous description;
    description->setName("adminfoo");
    description->setParents(std::list<std::string>(1, "settler"));
    OpVector res;

    int result = m_account->characterError(op, description, res);

    ASSERT_NOT_EQUAL(result, 0);
    ASSERT_EQUAL(res.size(), 1u);
    ASSERT_EQUAL(res.front()->getClassNo(),
                 Atlas::Objects::Operation::ERROR_NO);
}
开发者ID:9cat,项目名称:cyphesis,代码行数:17,代码来源:Playertest.cpp

示例4: exec


//.........这里部分代码省略.........
        std::vector<std::string> args;
        tokenize(arg, args);

        if (args.size() != 2) {
            std::cout << "usage: connect <hostname> <port>"
                      << std::endl << std::flush;

            reply_expected = false;
        } else {
            Anonymous cmap;
            cmap->setAttr("hostname", args[0]);
            cmap->setAttr("port", strtol(args[1].c_str(), 0, 10));

            Connect m;
            m->setArgs1(cmap);
            // No serialno yet
            // FIXME add serialno once Juncture context can handle this

            command_context->setFromContext(m);

            send(m);
        }
    } else if (cmd == "add_agent") {
        std::string agent_type("creator");

        if (!arg.empty()) {
            agent_type = arg;
        }
        
        Create c;

        Anonymous cmap;
        cmap->setParents(std::list<std::string>(1, agent_type));
        cmap->setName("cycmd agent");
        cmap->setObjtype("obj");
        c->setArgs1(cmap);
        c->setSerialno(newSerialNo());

        command_context->setFromContext(c);

        send(c);
    } else if (cmd == "delete") {
        if (arg.empty()) {
            std::cout << "Please specify the entity to delete" << std::endl << std::flush;
            reply_expected = false;
        } else {
            Delete del;

            Anonymous del_arg;
            del_arg->setId(arg);
            del->setArgs1(del_arg);

            command_context->setFromContext(del);

            send(del);

            reply_expected = false;
        }
    } else if (cmd == "find_by_name") {
        if (arg.empty()) {
            std::cout << "Please specify the name to search for" << std::endl << std::flush;
            reply_expected = false;
        } else {
            Look l;

            Anonymous lmap;
开发者ID:9cat,项目名称:cyphesis,代码行数:67,代码来源:Interactive.cpp


注:本文中的Anonymous::setName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。