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


C++ properties_t::begin方法代码示例

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


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

示例1: load

    void BehaviorNode::load(int version, const char* agentType, const properties_t& properties)
    {
        BEHAVIAC_UNUSED_VAR(version);
        BEHAVIAC_UNUSED_VAR(agentType);
        BEHAVIAC_UNUSED_VAR(properties);

        for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it)
        {
            const property_t& p = (*it);

            if (StringUtils::StrEqual(p.name, "EnterAction"))
            {
                if (p.value[0] != '\0')
                {
                    this->m_enterAction = Action::LoadMethod(p.value);
                }//if (p.value[0] != '\0')

            }
            else if (StringUtils::StrEqual(p.name, "ExitAction"))
            {
                if (p.value[0] != '\0')
                {
                    this->m_exitAction = Action::LoadMethod(p.value);
                }//if (p.value[0] != '\0')
            }
        }

        {
            const char* nodeType = this->GetObjectTypeName();
            Workspace::GetInstance()->BehaviorNodeLoaded(nodeType, properties);
        }
    }
开发者ID:haolly,项目名称:behaviac,代码行数:32,代码来源:behaviortree.cpp

示例2: load

    void ReferencedBehavior::load(int version, const char* agentType, const properties_t& properties)
    {
        super::load(version, agentType, properties);

        for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it)
        {
            const property_t& p = (*it);

            if (strcmp(p.name, "ReferenceFilename") == 0)
            {
                this->m_referencedBehaviorPath = p.value;

                bool bOk = Workspace::GetInstance()->Load(this->m_referencedBehaviorPath.c_str());
                BEHAVIAC_UNUSED_VAR(bOk);

                BEHAVIAC_ASSERT(bOk);

            }
            else if (strcmp(p.name, "Task") == 0)
            {
                BEHAVIAC_ASSERT(!StringUtils::IsNullOrEmpty(p.value));
                CMethodBase* m = Action::LoadMethod(p.value);
                //BEHAVIAC_ASSERT(m is CTaskMethod);

                this->m_taskMethod = (CTaskMethod*)m;

            }
            else
            {
                //BEHAVIAC_ASSERT(0, "unrecognised property %s", p.name);
            }
        }
    }
开发者ID:pjkui,项目名称:behaviac,代码行数:33,代码来源:referencebehavior.cpp

示例3: load

    void WaitFrames::load(int version, const char* agentType, const properties_t& properties)
    {
        super::load(version, agentType, properties);

        for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it)
        {
            const property_t& p = (*it);

            if (!strcmp(p.name, "Frames"))
            {
                const char* pParenthesis = strchr(p.value, '(');

                if (pParenthesis == 0)
                {
                    behaviac::string typeName;
                    behaviac::string propertyName;
                    this->m_frames_var = Condition::LoadRight(p.value, typeName);

                }
                else
                {
                    //method
                    this->m_frames_method = Action::LoadMethod(p.value);
                }
            }
        }
    }
开发者ID:Evilcoolkings,项目名称:behaviac,代码行数:27,代码来源:waitframes.cpp

示例4: load

    void DecoratorTime::load(int version, const char* agentType, const properties_t& properties)
    {
        super::load(version, agentType, properties);

        for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it)
        {
			const property_t& p = (*it);
			behaviac::string p_name(p.name);
			behaviac::string p_value(p.value);

			if (p_name == "Time")
			{
				if (StringUtils::IsValidString(p.value))
				{
					size_t pParenthesis = p_value.find_first_of('(');

					if (pParenthesis == (size_t)-1)
					{
						behaviac::string typeName;
						this->m_time_var = Condition::LoadRight(p.value, typeName);
					}
					else
					{
						this->m_time_m = Action::LoadMethod(p.value);
					}
				}
			}
        }
    }
开发者ID:WilliamChao,项目名称:behaviac,代码行数:29,代码来源:decoratortime.cpp

示例5: load

	void State::load(int version, const char* agentType, const properties_t& properties)
	{
		super::load(version, agentType, properties);

		for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it)
		{
			const property_t& p = (*it);

			if (strcmp(p.name, "Method") == 0)
			{
				if (p.value[0] != '\0')
				{
					this->m_method = Action::LoadMethod(p.value);
				}
			}
			else if (strcmp(p.name, "IsEndState") == 0)
			{
				if (p.value[0] != '\0')
				{
					if (StringUtils::StrEqual(p.value, "true"))
					{
						this->m_bIsEndState = true;
					}
				}//if (p.value[0] != '\0')
			}
		}
	}
开发者ID:Evilcoolkings,项目名称:behaviac,代码行数:27,代码来源:fsmstate.cpp

示例6: load

    void Query::load(int version, const char* agentType, const properties_t& properties)
    {
        super::load(version, agentType, properties);

        if (properties.size() > 0)
        {
            for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it)
            {
                const property_t& p = (*it);

                if (strcmp(p.name, "Domain") == 0)
                {
                    m_domain = p.value;
                }
                else if (strcmp(p.name, "Descriptors") == 0)
                {
                    SetDescriptors(p.value);
                }
                else
                {
                    //BEHAVIAC_ASSERT(0, "unrecognised property %s", p.name);
                }
            }
        }
    }
开发者ID:1414648814,项目名称:behaviac,代码行数:25,代码来源:query.cpp

示例7: load

    void Condition::load(int version, const char* agentType, const properties_t& properties)
    {
        super::load(version, agentType, properties);

        behaviac::string typeName;
        behaviac::string comparatorName;

        for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it)
        {
            const property_t& p = (*it);

            if (strcmp(p.name, "Operator") == 0)
            {
                comparatorName = p.value;
            }
            else if (strcmp(p.name, "Opl") == 0)
            {
                const char* pParenthesis = strchr(p.value, '(');

                if (pParenthesis == 0)
                {
					this->m_opl = LoadLeft(p.value, typeName);
                }
                else
                {
                    this->m_opl_m = Action::LoadMethod(p.value);
                }
            }
            else if (strcmp(p.name, "Opr") == 0)
            {
                const char* pParenthesis = strchr(p.value, '(');

                if (pParenthesis == 0)
                {
                    this->m_opr = LoadRight(p.value, typeName);
                }
                else
                {
                    this->m_opr_m = Action::LoadMethod(p.value);

                    if (this->m_opr_m)
                    {
                        this->m_opr_m->GetReturnTypeName(typeName);
                    }
                }
            }
            else
            {
                //BEHAVIAC_ASSERT(0, "unrecognised property %s", p.name);
            }
        }

        if (!comparatorName.empty() && (this->m_opl || this->m_opl_m) && (this->m_opr || this->m_opr_m))
        {
            this->m_comparator = Condition::Create(typeName.c_str(), comparatorName.c_str(), this->m_opl, this->m_opl_m, this->m_opr, this->m_opr_m);
        }
    }
开发者ID:Evilcoolkings,项目名称:behaviac,代码行数:57,代码来源:condition.cpp

示例8: load

    void Event::load(int version, const char* agentType, const properties_t& properties)
    {
        super::load(version, agentType, properties);

        behaviac::string typeName;
        behaviac::string propertyName;
        behaviac::string comparatorName;

        for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it)
        {
            const property_t& p = (*it);

            if (strcmp(p.name, "EventName") == 0)
            {
                //method
                this->m_event = Action::LoadMethod(p.value);

            }
            else if (strcmp(p.name, "ReferenceFilename") == 0)
            {
                this->m_referencedBehaviorPath = p.value;

            }
            else if (strcmp(p.name, "TriggeredOnce") == 0)
            {
                if (string_icmp(p.value, "true") == 0)
                {
                    this->m_bTriggeredOnce = true;
                }

            }
            else if (strcmp(p.name, "TriggerMode") == 0)
            {
                if (string_icmp(p.value, "Transfer") == 0)
                {
                    this->m_triggerMode = TM_Transfer;

                }
                else if (string_icmp(p.value, "Return") == 0)
                {
                    this->m_triggerMode = TM_Return;

                }
                else
                {
                    BEHAVIAC_ASSERT(0, "unrecognised trigger mode %s", p.value);
                }

            }
            else
            {
                //BEHAVIAC_ASSERT(0, "unrecognised property %s", p.name);
            }
        }
    }
开发者ID:pjkui,项目名称:behaviac,代码行数:55,代码来源:event.cpp

示例9: load

	void FSM::load(int version, const char* agentType, const properties_t& properties)
	{
		super::load(version, agentType, properties);

		for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it)
		{
			const property_t& p = (*it);

			if (strcmp(p.name, "initialid") == 0)
			{
				this->m_initialId = atoi(p.value);
			}
		}
	}
开发者ID:dengyangli,项目名称:behaviac,代码行数:14,代码来源:fsm.cpp

示例10: load

    void DecoratorLog::load(int version, const char* agentType, const properties_t& properties)
    {
        super::load(version, agentType, properties);

        for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it)
        {
            const property_t& p = (*it);

            if (strcmp(p.name, "Log") == 0)
            {
                this->m_message = p.value;
            }
        }
    }
开发者ID:Evilcoolkings,项目名称:behaviac,代码行数:14,代码来源:decoratorlog.cpp

示例11: load

    void Action::load(int version, const char* agentType, const properties_t& properties)
    {
        super::load(version, agentType, properties);

        for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it)
        {
            const property_t& p = (*it);

            if (strcmp(p.name, "Method") == 0)
            {
                if (p.value[0] != '\0')
                {
                    this->m_method = Action::LoadMethod(p.value);
                }
            }
            else if (strcmp(p.name, "ResultOption") == 0)
            {
                if (strcmp(p.value, "BT_INVALID") == 0)
                {
                    m_resultOption = BT_INVALID;

                }
                else if (strcmp(p.value, "BT_FAILURE") == 0)
                {
                    m_resultOption = BT_FAILURE;

                }
                else if (strcmp(p.value, "BT_RUNNING") == 0)
                {
                    m_resultOption = BT_RUNNING;

                }
                else
                {
                    m_resultOption = BT_SUCCESS;
                }
            }
            else if (strcmp(p.name, "ResultFunctor") == 0)
            {
                if (p.value[0] != '\0')
                {
                    this->m_resultFunctor = LoadMethod(p.value);
                }
            }
            else
            {
                //BEHAVIAC_ASSERT(0, "unrecognised property %s", p.name);
            }
        }
    }
开发者ID:Evilcoolkings,项目名称:behaviac,代码行数:50,代码来源:action.cpp

示例12: load

    void Compute::load(int version, const char* agentType, const properties_t& properties) {
        super::load(version, agentType, properties);

        behaviac::string typeName;
        behaviac::string propertyName;

        for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it) {
            const property_t& p = (*it);

            if (StringUtils::StringEqual(p.name, "Opl")) {
                //this->m_opl = Condition::LoadLeft(p.value, typeName);
                this->m_opl = AgentMeta::ParseProperty(p.value);
            } else if (StringUtils::StringEqual(p.name, "Operator")) {
                BEHAVIAC_ASSERT(StringUtils::StringEqual(p.value, "Add")
                                || StringUtils::StringEqual(p.value, "Sub")
                                || StringUtils::StringEqual(p.value, "Mul")
                                || StringUtils::StringEqual(p.value, "Div"));

                this->m_operator = OperationUtils::ParseOperatorType(p.value);

            } else if (StringUtils::StringEqual(p.name, "Opr1")) {
                const char* pParenthesis = strchr(p.value, '(');

                if (pParenthesis == 0) {
                    //this->m_opr1 = Condition::LoadRight(p.value, typeName);
                    this->m_opr1 = AgentMeta::ParseProperty(p.value);
                } else {
                    //method
                    //this->m_opr1_m = Action::LoadMethod(p.value);
                    this->m_opr1 = AgentMeta::ParseMethod(p.value);
                }
            } else if (StringUtils::StringEqual(p.name, "Opr2")) {
                const char* pParenthesis = strchr(p.value, '(');

                if (pParenthesis == 0) {
                    this->m_opr2 = AgentMeta::ParseProperty(p.value);
                    //this->m_opr2 = Condition::LoadRight(p.value, typeName);
                } else {
                    //method
                    //this->m_opr2_m = Action::LoadMethod(p.value);
                    this->m_opr2 = AgentMeta::ParseMethod(p.value);
                }
            } else {
                //BEHAVIAC_ASSERT(0, "unrecognised property %s", p.name);
            }
        }

        this->m_typeName = typeName;
    }
开发者ID:YaleCheung,项目名称:behaviac,代码行数:49,代码来源:compute.cpp

示例13: load

    void SelectorProbability::load(int version, const char* agentType, const properties_t& properties) {
        super::load(version, agentType, properties);

        for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it) {
            const property_t& p = (*it);

			if (StringUtils::StringEqual(p.name, "RandomGenerator")) {
                if (p.value[0] != '\0') {
                    this->m_method = AgentMeta::ParseMethod(p.value);
                }//if (p.value[0] != '\0')

            } else {
                //BEHAVIAC_ASSERT(0, "unrecognised property %s", p.name);
            }
        }
    }
开发者ID:YaleCheung,项目名称:behaviac,代码行数:16,代码来源:selectorprobability.cpp

示例14: load

    void DecoratorWeight::load(int version, const char* agentType, const properties_t& properties)
    {
        super::load(version, agentType, properties);

        for (propertie_const_iterator_t it = properties.begin(); it != properties.end(); ++it)
        {
            const property_t& p = (*it);

            if (strcmp(p.name, "Weight") == 0)
            {
                behaviac::string typeName;
                behaviac::string propertyName;
                this->m_weight_var = Condition::LoadRight(p.value, typeName);
            }
        }
    }
开发者ID:1414648814,项目名称:behaviac,代码行数:16,代码来源:decoratorweight.cpp

示例15: load

    void DecoratorIterator::load(int version, const char*  agentType, const properties_t& properties)
    {
        super::load(version, agentType, properties);

        behaviac::string typeName;
        behaviac::string propertyName;

        for (propertie_const_iterator_t p = properties.begin(); p != properties.end(); ++p)
        {
            if (strcmp(p->name, "Opl") == 0)
            {
                behaviac::string str(p->value);
                size_t pParenthesis = str.find_first_of('(');

				if (pParenthesis == (size_t)-1)
                {
                    this->m_opl = Condition::LoadLeft(p->value);

                }
                else
                {
                    BEHAVIAC_ASSERT(false);
                }
            }
            else if (strcmp(p->name, "Opr") == 0)
            {
                behaviac::string str(p->value);
                size_t pParenthesis = str.find_first_of('(');

				if (pParenthesis == (size_t)-1)
                {
                    this->m_opr = Condition::LoadRight(p->value, typeName);

                }
                else
                {
                    //method
                    this->m_opr_m = Action::LoadMethod(p->value);
                }
            }
            else
            {
                //BEHAVIAC_ASSERT(0, "unrecognised property %s", p->name);
            }
        }
    }
开发者ID:AdamHyl,项目名称:behaviac,代码行数:46,代码来源:decoratoriterator.cpp


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