• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Property函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Property函数的典型用法代码示例。如果您正苦于以下问题:C++ Property函数的具体用法?C++ Property怎么用?C++ Property使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: AddProperty

	void INI::AddProperty(std::string key, std::string value)
	{
		if (sections.size() == 0)
			globalProperties.push_back(Property(key, value));
		else
			sections.back().properties.push_back(Property(key, value));
	}
开发者ID:ShrewdSpirit,项目名称:Sini,代码行数:7,代码来源:sini.cpp


示例2: Property

 void Armor::onStateChange(GameObjectState oldState, GameObjectState newState)
 {
     if (oldState != newState)
     {
         if (newState == GOS_READY)
         {
             if (getOwner())
             {
                 mRsEffect = EffectFactoryManager::getSingleton().createEffect(
                     "Ruestung");
                 if(mRsEffect == NULL)
                     return;
                 mRsEffect->setProperty(Armor::PROPERTY_G_BE, Property(mGBE));
                 mRsEffect->setProperty(Armor::PROPERTY_G_RS, Property(mGRS));
                 getOwner()->addEffect(mRsEffect);
             }
         }
         else if (oldState == GOS_READY)
         {
             if (getOwner())
             {
                 if(mRsEffect == NULL)
                     return;
                 getOwner()->removeEffect(mRsEffect);
                 delete mRsEffect;
             }
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:dsa-hl-svn,代码行数:29,代码来源:Armor.cpp


示例3: DALI_LOG_TRACE_METHOD

AnimationPtr ModelActorFactory::CreateAnimation(
    Actor& rootActor,
    const ModelAnimationMap* animationData,
    AlphaFunction alpha,
    float durationSeconds)
{
    DALI_LOG_TRACE_METHOD(Debug::Filter::gModel);

    AnimationPtr animation(Animation::New(durationSeconds));
    animation->SetDefaultAlphaFunction(alpha);

    for(EntityAnimatorMapIter it = animationData->animators.begin(); it != animationData->animators.end(); ++it)
    {
        const EntityAnimatorMap& entityAnimator(*it);

        // find actor for this animator
        ActorPtr animatedActor = rootActor.FindChildByName(entityAnimator.GetEntityName());
        if (!animatedActor)
        {
            // If we can't find the actor, it may not have been instantiated, may
            // be a sibling or parent of rootActor or may have been removed.
            continue;
        }

        Dali::Actor targetActor(animatedActor.Get());

        Dali::KeyFrames posKFHandle = entityAnimator.GetPositionKeyFrames();
        if(posKFHandle)
        {
            const KeyFrames& positionKeyFrames = GetImplementation(posKFHandle);
            if(positionKeyFrames.GetKeyFramesBase()->GetNumberOfKeyFrames() > 0)
            {
                animation->AnimateBetween(Property(targetActor, Dali::Actor::POSITION),
                                          positionKeyFrames, alpha, durationSeconds);
            }
        }

        Dali::KeyFrames scaleKFHandle = entityAnimator.GetScaleKeyFrames();
        if(scaleKFHandle)
        {
            const KeyFrames& scaleKeyFrames    = GetImplementation(scaleKFHandle);
            if(scaleKeyFrames.GetKeyFramesBase()->GetNumberOfKeyFrames() > 0)
            {
                animation->AnimateBetween(Property(targetActor, Dali::Actor::SCALE),    scaleKeyFrames, alpha, durationSeconds);
            }
        }

        Dali::KeyFrames rotationKFHandle = entityAnimator.GetRotationKeyFrames();
        if(rotationKFHandle)
        {
            const KeyFrames& rotationKeyFrames = GetImplementation(rotationKFHandle);
            if(rotationKeyFrames.GetKeyFramesBase()->GetNumberOfKeyFrames() > 0)
            {
                animation->AnimateBetween(Property(targetActor, Dali::Actor::ROTATION), rotationKeyFrames, alpha, durationSeconds);
            }
        }
    }
    return animation;
}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:59,代码来源:model-actor-factory-impl.cpp


示例4: Property

void Renderer::addNextMesh() {
    std::string model_filename = current_mesh->path().string();
    std::cout << "selecting model: " << model_filename << std::endl;
    config.GetScene().Parse(
            Property("scene.shapes.subject.type")("mesh") <<
            Property("scene.shapes.subject.ply")(model_filename));
    config.GetScene().RemoveUnusedMeshes();
}
开发者ID:stoutbeard,项目名称:ObjectRenderer,代码行数:8,代码来源:Renderer.cpp


示例5: enumPropertiesTree

	// 枚举所有属性,以树的形式
	void TriggerObject::enumPropertiesTree(VTProperty &properties)const
	{
		NullObject::enumPropertiesTree(properties);
		properties.push_back(Property( ID_Trigger , PT_GROUP , "触发器设置" , "触发器设置" , true , false , false));
		properties.back().addChild(Property( ID_TriggerCondition , PT_BOOL , "满足条件" , "是否已经满足条件触发这个触发器,只有当条件满足时才可以触发" , true , true , true));
		properties.back().addChild(Property( ID_TriggerOnEnterEvent , PT_STRING , "进入事件" , "当满足条件后进入触发器,就会触发这个事件" , true , true , true));
		properties.back().addChild(Property( ID_TriggerOnLeaveEvent , PT_STRING , "退出事件" , "当触发了进入事件后退出触发器,就会触发这个事件" , true , true , true));
	}
开发者ID:duzhi5368,项目名称:FKOgreWorldEdit,代码行数:9,代码来源:TriggerObject.cpp


示例6: Property

	PropertyGroupInstance SampleSensorFactory::GetSensorProperties( SampleSensor& sensor )
	{
		PropertyGroupInstance properties;
		properties.push_back( Property( sensor.sendRate ) );
		properties.push_back( Property( sensor.quality_factor ) );

		return properties;
	}
开发者ID:jgstorms,项目名称:ANVEL-Android-Plugin,代码行数:8,代码来源:SampleSensor.cpp


示例7: constraints

    void constraints() {
      function_requires< ReadablePropertyGraphConcept<G, X, Property> >();
      function_requires< ReadWritePropertyMapConcept<Map, X> >();

      Map pmap = get(Property(), g);
      pval = get(Property(), g, x);
      put(Property(), g, x, pval);
      ignore_unused_variable_warning(pmap);
    }
开发者ID:metashell,项目名称:headers,代码行数:9,代码来源:graph_concepts.hpp


示例8: Property

void
CannaJRKanji::install_properties (void)
{
    m_properties.clear ();

    Property prop;

    prop = Property (SCIM_PROP_INPUT_MODE,
                     _("Input mode"), String (""),
                     _("Input mode"));
    m_properties.push_back (prop);

    prop = Property (SCIM_PROP_INPUT_MODE_OFF,
                     _("Off"), String (""),
                     _("Off"));
    m_properties.push_back (prop);

    prop = Property (SCIM_PROP_INPUT_MODE_HIRAGANA,
                     _("Hiragana"), String (""),
                     _("Hiragana"));
    m_properties.push_back (prop);

    prop = Property (SCIM_PROP_INPUT_MODE_KATAKANA,
                     _("Katakana"), String (""),
                     _("Katakana"));
    m_properties.push_back (prop);

    prop = Property (SCIM_PROP_INPUT_MODE_HALF_KATAKANA,
                     _("Half width katakana"), String (""),
                     _("Half width katakana"));
    m_properties.push_back (prop);

    prop = Property (SCIM_PROP_INPUT_MODE_ALPHABET,
                     _("Alphabet"), String (""),
                     _("Alphabet"));
    m_properties.push_back (prop);

    prop = Property (SCIM_PROP_INPUT_MODE_WIDE_ALPHABET,
                     _("Wide alphabet"), String (""),
                     _("Wide alphabet"));
    m_properties.push_back (prop);

    prop = Property (SCIM_PROP_INPUT_MODE_KIGO,
                     _("Symbols"), String (""),
                     _("Search a symbol"));
    m_properties.push_back (prop);

    prop = Property (SCIM_PROP_INPUT_MODE_HEX,
                     _("Hex"), String (""),
                     _("Search a kanji by hex"));
    m_properties.push_back (prop);

    prop = Property (SCIM_PROP_INPUT_MODE_BUSHU,
                     _("Bushu"), String (""),
                     _("Search a kanji by bushu"));
    m_properties.push_back (prop);
}
开发者ID:tzhuan,项目名称:scim-canna-debian,代码行数:57,代码来源:canna_jrkanji.cpp


示例9: Property

QList<PipelineComponent::Property> CsvSourceComponent::getProperties()
{
    QList<Property> l;
    l << Property(this, "Spectrum", "Sets the spectrum", spectrum);
    l << Property(this, "Step size", "Specifies the step size", stepSize, 0.0,  10000.0, "m");
    l << Property(this, "Intensity", "Holds the path to the CSV file containing the intensity distribution. Can NOT be empty!", QFile(intensityDataPath));
    l << Property(this, "Phase", "Holds the path to the CSV file containing  the phase distribution. Can be empty!", QFile(phaseDataPath));
    l << Property(this, "CSV separator", "Specifies the CSV separator", csvSeparator);
    return l;
}
开发者ID:timbz,项目名称:Hipnos,代码行数:10,代码来源:csvsourcecomponent.cpp


示例10: Validate

TBool CUPnPArgument::Validate(const RStringPool& aStringPool, const TStringTable& aStringTable ) const
	{
	TBool result=EFalse;
	if(	(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EName, aStringTable)).Length()!=0) &&
			(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::EArgumentDirection, aStringTable)).Length()!=0) &&	
			(Property(aStringPool.String(UPNPDESCRIPTIONXMLTAGS::ERelatedStateVar, aStringTable)).Length()!=0))
				result = ETrue;
	
	return result;
	
	}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:11,代码来源:cpnpserviceparam.cpp


示例11: model

void Test_ormtool::createSqlScriptForTable()
{
    SqlScriptBuilder builder;
    builder.setDriverName("QMYSQL");
    builder.fillTableTypesMySql();
    Model model("Table");
    model.addProperty(Property("QString", "name"));
    model.addProperty(Property("int", "number"));
    QCOMPARE(builder.createSqlScriptForTableMySql(model).simplified(), QString("CREATE TABLE Table(id BIGINT AUTO_INCREMENT, name TEXT, number INT, "
                                                             "PRIMARY KEY(id));").simplified());
}
开发者ID:sentical,项目名称:ORM,代码行数:11,代码来源:tst_test_ormtool.cpp


示例12: SideSet

  void DatabaseIO::create_group(EntityType type, const std::string & /*type_name*/,
                                const std::vector<std::string> &group_spec,
                                const SideSet * /*set_type*/)
  {
    // Not generalized yet... This only works for T == SideSet
    if (type != SIDESET) {
      return;
    }

    int64_t entity_count = 0;
    int64_t df_count     = 0;

    // Create the new set...
    auto new_set = new SideSet(this, group_spec[0]);

    get_region()->add(new_set);

    // Find the member SideSets...
    for (size_t i = 1; i < group_spec.size(); i++) {
      SideSet *set = get_region()->get_sideset(group_spec[i]);
      if (set != nullptr) {
        SideBlockContainer side_blocks = set->get_side_blocks();
        for (auto &sbold : side_blocks) {
          size_t side_count = sbold->get_property("entity_count").get_int();
          auto   sbnew      = new SideBlock(this, sbold->name(), sbold->topology()->name(),
                                     sbold->parent_element_topology()->name(), side_count);
          int64_t id = sbold->get_property("id").get_int();
          sbnew->property_add(Property("set_offset", entity_count));
          sbnew->property_add(Property("set_df_offset", df_count));
          sbnew->property_add(Property("id", id));

          new_set->add(sbnew);

          size_t old_df_count = sbold->get_property("distribution_factor_count").get_int();
          if (old_df_count > 0) {
            std::string storage = "Real[";
            storage += Utils::to_string(sbnew->topology()->number_nodes());
            storage += "]";
            sbnew->field_add(
                Field("distribution_factors", Field::REAL, storage, Field::MESH, side_count));
          }
          entity_count += side_count;
          df_count += old_df_count;
        }
      }
      else {
        IOSS_WARNING << "WARNING: While creating the grouped surface '" << group_spec[0]
                     << "', the surface '" << group_spec[i] << "' does not exist. "
                     << "This surface will skipped and not added to the group.\n\n";
      }
    }
  }
开发者ID:trilinos,项目名称:Trilinos,代码行数:52,代码来源:Ioss_DatabaseIO.C


示例13: Item_Detail

int Vip::req_vip_daily_receive(void){
	if(vip_detail_->has_receive_daily_reward) {
		return ERROR_RECEIVED_VIP_DAILY;
	}
	const Vip_Daily_Item_Config_Vec *conf = CONFIG_CACHE_VIP->get_vip_daily_config(player_self()->vip());
	if(conf) {
		Item_Vec item_list; item_list.clear();
		Money_Add_List money_add_list; money_add_list.clear();
		uint32_t exp = 0;
		MSG_81000102 acv_msg;
		acv_msg.type = 0;
		for(Vip_Daily_Item_Config_Vec::const_iterator it = conf->begin(); it != conf->end(); ++it) {
			if(it->item_id == PT_EXP_CURRENT) {
				exp += it->num;
			} else {
				if(it->item_id > 999999) {
					Item_Detail item = Item_Detail(it->item_id, it->num, it->bind);
					item_list.push_back(item);
					Item_Basic_Info ibi;
					item.set_item_basic_info(ibi);
					acv_msg.item_info.push_back(ibi);
				} else {
					money_add_list.push_back(Money_Add_Info(Money_Type(it->item_id), it->num,Money_DM_Info(MONEY_ADD_VIP_DAILY)));
					acv_msg.property.push_back(Property(it->item_id, it->num));
				}
			}
		}
		if(!item_list.empty()) {
			int result = player_self()->pack_insert_item(PACK_T_PACKAGE_INDEX, item_list, Gain_Item_DM_Info(ITEM_GAIN_VIP_DAILY));
			if(result) {
				return result;
			}
		}
		if(!money_add_list.empty()) {
			player_self()->pack_add_money(money_add_list);
		}
		if(exp) {
			const Exp_All exp_all = player_self()->modify_experience_inter(exp, false, false, true);
			if (0 == exp_all.result) {
				acv_msg.property.push_back(Property(PT_EXP_CURRENT, exp_all.all));
				acv_msg.vip_exp = exp_all.vip_exp;
				acv_msg.world_level = player_self()->get_world_level_add();
			}
		}
		vip_detail_->has_receive_daily_reward = true;
		vip_detail_->detail_change();
		MSG_50106206 msg;
		THIS_SEND_TO_CLIENT(msg);
		THIS_SEND_TO_CLIENT(acv_msg);
	}
	return 0;
}
开发者ID:tidaybreak,项目名称:game-server,代码行数:52,代码来源:Vip.cpp


示例14: on_start

void Parser::parse_property( std::string const& tag )
{
    std::vector<Property> propertys;
    std::string::size_type pos = tag.find( ' ' );
    if( pos == std::string::npos )
    {
        on_start( tag, propertys );
        return;
    }
    std::string tag_name = tag.substr( 0, pos );

    std::string::size_type  p1 = tag.find( '=', pos + 1 );
    while( p1 != std::string::npos 
        && pos != std::string::npos )
    {
        std::string name = property_name( tag, pos, p1 );
        std::string::size_type p2 = tag.find( '\x22', p1 );//find "
        if( p2 != std::string::npos )
        {
            std::string::size_type p3 = tag.find( '\x22', p2 + 1 );
            if( p3 != std::string::npos )
            {
                std::string value( tag.substr( p2 + 1, p3 - p2 - 1 ) );
                propertys.push_back( Property( name, value ) );
                pos = tag.find( ' ', p3 );
            }
            else
                pos = tag.find( ' ', p2 );
        }
        else if( ( p2 = tag.find( '\x27', p1 ) ) != std::string::npos )//find '
        {
            std::string::size_type p3 = tag.find( '\x27', p2 + 1 );
            if( p3 != std::string::npos )
            {
                std::string value( tag.substr( p2 + 1, p3 - p2 - 1 ) );
                propertys.push_back( Property( name, value ) );
                pos = tag.find( ' ', p3 );
            }
            else
                pos = tag.find( ' ', p2 );
        }
        else
        {
           pos = tag.find( ' ', p1 );
        }
        p1 = tag.find( '=', pos + 1 );
    }
    on_start( tag_name, propertys );
}
开发者ID:cg8530,项目名称:WorkSplace,代码行数:49,代码来源:xmlparser.cpp


示例15: switch

 /** \brief Reverse Property. */
 Property Property::operator ~ () const
 {
     switch (PROP2DIR(_property))
     {
     case Forward:
         return Property(PROP2NODE(_property), Backward);
         break;
     case Backward:
         return Property(PROP2NODE(_property), Forward);
         break;
     default:
         return *this;
         break;
     }
 }
开发者ID:project-renard-survey,项目名称:utopia-documents-mirror,代码行数:16,代码来源:property.cpp


示例16: Property

void 
Base::Set(
    const vd::string& name, 
    const Property::ValueType& value)
{ 
    m_Properties[name] = Property(name, value); 
}
开发者ID:voidcycles,项目名称:void,代码行数:7,代码来源:model.cpp


示例17: setString

bool Properties::setString(const char* name, const char* value)
{
    if (name)
    {
        for (std::vector<Property>::iterator itr = _properties.begin(); itr != _properties.end(); ++itr)
        {
            if (itr->name == name)
            {
                // Update the first property that matches this name
                itr->value = value ? value : "";
                return true;
            }
        }

        // There is no property with this name, so add one
        _properties.push_back(Property(name, value ? value : ""));
    }
    else
    {
        // If there's a current property, set its value
        if (_propertiesItr == _properties.end())
            return false;

        _propertiesItr->value = value ? value : "";
    }

    return true;
}
开发者ID:1005491398,项目名称:Threes,代码行数:28,代码来源:CCProperties.cpp


示例18: foreach

void GLState::apply() const
{
    // Update the render target.
    if(currentTarget != d->target)
    {
        if(currentTarget) currentTarget->glRelease();
        currentTarget = d->target;
        if(currentTarget) currentTarget->glBind();
    }

    // Determine which properties have changed.
    BitField::Ids changed;
    if(!currentProps.size())
    {
        // Apply everything.
        changed = d->props.elementIds();
    }
    else
    {
        // Just apply the changed parts of the state.
        changed = d->props.delta(currentProps);
    }

    if(!changed.isEmpty())
    {
        d->removeRedundancies(changed);

        // Apply the changed properties.
        foreach(BitField::Id id, changed)
        {
            d->glApply(Property(id));
        }
开发者ID:roman313,项目名称:Doomsday-Engine,代码行数:32,代码来源:glstate.cpp


示例19:

void c4_CustomHandler::Set(int index_, const c4_Bytes& buf_)
{
  int colnum = _seq->PropIndex(Property().GetId());
  d4_assert(colnum >= 0);
  
  _seq->DoSet(index_, colnum, buf_);
}
开发者ID:SASfit,项目名称:SASfit,代码行数:7,代码来源:custom.cpp


示例20: JUDGE_PLAYER_NULL

int Scene_Server_Request::process_20410001(int cid, role_id_t role_id, Scene_Player *player, Block_Buffer &buf) {
	JUDGE_PLAYER_NULL(player, role_id);

	MSG_50200032 res_msg;
	res_msg.role_id = player->role_id();
	res_msg.open_type = 1;

	player->fighter_detail().property_list(res_msg.prop_value);
	Hero *hero = SCENE_PUBLIC->find_fight_hero(player->role_id());
	if (hero) {
		int hero_init_morale_type = hero->fighter_detail().init_morale.type;
		double hero_init_morale_val = hero->fighter_detail().init_morale.total();
		for (uint16_t i = 0; i < res_msg.prop_value.size(); ++i) {
			if (res_msg.prop_value[i].type == hero_init_morale_type) {
				res_msg.prop_value[i].value += hero_init_morale_val;
			}
		}
	}
	res_msg.prop_value.push_back(Property(PT_CAREER, player->career()));

	res_msg.role_name = player->role_name();/*人物姓名*/
	res_msg.gang_name = player->base_detail().gang_name;/*人物id*/
	res_msg.gender = player->base_detail().gender;/*性别(1男,2女)*/
	res_msg.gang_id = player->base_detail().gang_id;/*职业*/
	res_msg.headship = player->ganger_detail().headship;
	res_msg.avatar_vec = player->base_detail().avatar_vec;

    OBJ_SEND_TO_CLIENT(res_msg, (*player));
	return 0;
}
开发者ID:tidaybreak,项目名称:game-server,代码行数:30,代码来源:Scene_Server_Request.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PropertyInfo函数代码示例发布时间:2022-05-30
下一篇:
C++ PropVariantInit函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap