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


C++ Dynamic类代码示例

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


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

示例1: HX_SOURCE_PUSH

Dynamic EmbeddedBoxRenderer_obj::render( ){
	HX_SOURCE_PUSH("EmbeddedBoxRenderer_obj::render")
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",44)
	Dynamic ret = Dynamic( Array_obj<Dynamic>::__new());
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",52)
	::nme::display::Sprite nativeElement = this->_style->get_htmlElement()->get_nativeElement();
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",54)
	nativeElement->nmeGetGraphics()->clear();
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",55)
	nativeElement->nmeGetGraphics()->beginFill((int)65280,0.0);
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",56)
	nativeElement->nmeGetGraphics()->drawRect((this->_bounds->__Field(HX_CSTRING("x")) + this->_style->getComputedStyle()->__Field(HX_CSTRING("paddingLeft"))),(this->_bounds->__Field(HX_CSTRING("y")) + this->_style->getComputedStyle()->__Field(HX_CSTRING("paddingTop"))),this->_bounds->__Field(HX_CSTRING("width")),this->_bounds->__Field(HX_CSTRING("height")));
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",58)
	nativeElement->nmeGetGraphics()->endFill();
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",62)
	ret->__Field(HX_CSTRING("push"))(nativeElement);
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",65)
	::core::html::EmbeddedElement embeddedHTMLElement = this->_style->get_htmlElement();
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",66)
	ret->__Field(HX_CSTRING("push"))(embeddedHTMLElement->get_embeddedAsset());
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",69)
	embeddedHTMLElement->get_embeddedAsset()->__FieldRef(HX_CSTRING("x")) = (this->_bounds->__Field(HX_CSTRING("x")) + this->_style->getComputedStyle()->__Field(HX_CSTRING("paddingLeft")));
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",70)
	embeddedHTMLElement->get_embeddedAsset()->__FieldRef(HX_CSTRING("y")) = (this->_bounds->__Field(HX_CSTRING("y")) + this->_style->getComputedStyle()->__Field(HX_CSTRING("paddingTop")));
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",72)
	embeddedHTMLElement->get_embeddedAsset()->__FieldRef(HX_CSTRING("width")) = this->_style->getComputedStyle()->__Field(HX_CSTRING("width"));
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",73)
	embeddedHTMLElement->get_embeddedAsset()->__FieldRef(HX_CSTRING("height")) = this->_style->getComputedStyle()->__Field(HX_CSTRING("height"));
	HX_SOURCE_POS("../../src/core/renderer/EmbeddedBoxRenderer.hx",83)
	return ret;
}
开发者ID:gboschini,项目名称:Cocktail,代码行数:31,代码来源:EmbeddedBoxRenderer.cpp

示例2: RemoveLink

void Dynamic::RemoveLink(int plaats)
{
	Dynamic *plaatsPtr = m_LinkList.at( plaats );

	//int erasePlaatsen[MAX_LINKS];
	//int counter= 0;

	m_LinkList.erase(m_LinkList.begin() + plaats);
	m_LinkLen.erase(  m_LinkLen.begin() + plaats);

	for( unsigned int hisLink= 0; hisLink< plaatsPtr->m_LinkList.size(); ++hisLink ){
		if( plaatsPtr->m_LinkList.at(hisLink) == this ){
			plaatsPtr->m_LinkList.erase(plaatsPtr->m_LinkList.begin() + hisLink);
			plaatsPtr->m_LinkLen.erase( plaatsPtr-> m_LinkLen.begin() + hisLink);
			plaatsPtr->SetCluster( m_DynamicListPtr->GetMaxCluster() );
			m_DynamicListPtr->VerhoogMaxCluster();
			return;
		}
	}

	/*for( int i= 0; i<counter; ++i ){
		plaatsPtr->m_LinkList.erase(plaatsPtr->m_LinkList.begin() + erasePlaatsen[i]);
		plaatsPtr->m_LinkLen.erase( plaatsPtr-> m_LinkLen.begin() + erasePlaatsen[i]);
	}*/

	
}
开发者ID:EmileSonneveld,项目名称:AmpGame,代码行数:27,代码来源:Dynamic.cpp

示例3: addEventListener

Void EventDispatcher_obj::addEventListener( ::String type,Dynamic listener,Dynamic __o_useCapture,Dynamic __o_priority,Dynamic __o_useWeakReference){
bool useCapture = __o_useCapture.Default(false);
int priority = __o_priority.Default(0);
bool useWeakReference = __o_useWeakReference.Default(false);
	HX_SOURCE_PUSH("EventDispatcher_obj::addEventListener");
{
		HX_SOURCE_POS("C:\\Motion-Twin\\haxe\\dev\\nme/nme/events/EventDispatcher.hx",24)
		if (((this->nmeEventMap == null()))){
			HX_SOURCE_POS("C:\\Motion-Twin\\haxe\\dev\\nme/nme/events/EventDispatcher.hx",25)
			this->nmeEventMap = ::Hash_obj::__new();
		}
		HX_SOURCE_POS("C:\\Motion-Twin\\haxe\\dev\\nme/nme/events/EventDispatcher.hx",26)
		Array< ::nme::events::Listener > list = this->nmeEventMap->get(type);
		HX_SOURCE_POS("C:\\Motion-Twin\\haxe\\dev\\nme/nme/events/EventDispatcher.hx",27)
		if (((list == null()))){
			HX_SOURCE_POS("C:\\Motion-Twin\\haxe\\dev\\nme/nme/events/EventDispatcher.hx",29)
			list = Array_obj< ::nme::events::Listener >::__new();
			HX_SOURCE_POS("C:\\Motion-Twin\\haxe\\dev\\nme/nme/events/EventDispatcher.hx",30)
			this->nmeEventMap->set(type,list);
		}
		HX_SOURCE_POS("C:\\Motion-Twin\\haxe\\dev\\nme/nme/events/EventDispatcher.hx",33)
		::nme::events::Listener l = ::nme::events::Listener_obj::__new(listener,useCapture,priority);
		HX_SOURCE_POS("C:\\Motion-Twin\\haxe\\dev\\nme/nme/events/EventDispatcher.hx",34)
		list->push(l);
	}
return null();
}
开发者ID:alecmce,项目名称:haxe_game_of_life,代码行数:27,代码来源:EventDispatcher.cpp

示例4: CreateCases

  void CreateCases()
  {
    std::string error;

    { // StringVector ctor
      StringVector column_names;
      column_names.push_back("name:STRING");
      column_names.push_back("name1:INTEGER");
      column_names.push_back("name2:BOOL");
      column_names.push_back("name3:INTEGER");
      column_names.push_back("name4:FLOAT");

      for (size_t i = 0; i < TABLE_GROW_SIZE; ++i)
      {
        std::string const v = "name" + string_cast(i) + "STRING";
        column_names.push_back(v);
      }
      Dynamic table = Dynamic::Table(column_names, &error);
      NKIT_TEST_ASSERT_WITH_TEXT(table.width() == column_names.size(), error);
    }

    { // query syntax ctor
      std::string query(
          "name:STRING,name1:INTEGER,name2:BOOL,name3:INTEGER,name4:FLOAT");
      Dynamic table = Dynamic::Table(query, &error);
      NKIT_TEST_ASSERT(table.width() == 5);
    }
  }
开发者ID:dedok,项目名称:nkit,代码行数:28,代码来源:test_dynamic_table.cpp

示例5: HX_STACK_PUSH

::motion::actuators::IGenericActuator TransformOptions_obj::sound( Dynamic volume,Dynamic pan){
	HX_STACK_PUSH("TransformOptions::sound","motion/Actuate.hx",497);
	HX_STACK_THIS(this);
	HX_STACK_ARG(volume,"volume");
	HX_STACK_ARG(pan,"pan");
	struct _Function_1_1{
		inline static Dynamic Block( ){
			HX_STACK_PUSH("*::closure","motion/Actuate.hx",499);
			{
				hx::Anon __result = hx::Anon_obj::Create();
				return __result;
			}
			return null();
		}
	};
	HX_STACK_LINE(499)
	Dynamic properties = _Function_1_1::Block();		HX_STACK_VAR(properties,"properties");
	HX_STACK_LINE(501)
	if (((volume != null()))){
		HX_STACK_LINE(501)
		properties->__FieldRef(HX_CSTRING("soundVolume")) = volume;
	}
	HX_STACK_LINE(507)
	if (((pan != null()))){
		HX_STACK_LINE(507)
		properties->__FieldRef(HX_CSTRING("soundPan")) = pan;
	}
	HX_STACK_LINE(513)
	return ::motion::Actuate_obj::tween(this->target,this->duration,properties,this->overwrite,hx::ClassOf< ::motion::actuators::TransformActuator >());
}
开发者ID:dylanmarcus,项目名称:stencylworks,代码行数:30,代码来源:TransformOptions.cpp

示例6: __int_hash_set

void __int_hash_set(Dynamic &ioHash,int inKey,const Dynamic &value)
{
   IntHashBase *hash = static_cast<IntHashBase *>(ioHash.GetPtr());
   if (!hash)
   {
      #ifdef HX_DYNAMIC_HASH_VALUES
      hash = new IntHashObject();
      #else
      if (value==null())
      {
         hash = new IntHashObject();
      }
      else
      {
         hxObjectType type = (hxObjectType)value->__GetType();
         if (type==vtInt)
            hash = new IntHashInt();
         else if (type==vtFloat)
            hash = new IntHashFloat();
         else if (type==vtString)
            hash = new IntHashString();
         else // Object or bool
            hash = new IntHashObject();
      }
      #endif
      ioHash = hash;
   }
   else if (hash->store!=hashObject)
   {
      HashStore want = hashObject;
      if (value!=null())
      {
         hxObjectType type = (hxObjectType)value->__GetType();
         if ( type==vtInt)
         {
            if (hash->store==hashFloat)
               want = hashFloat;
            else if (hash->store==hashInt)
               want = hashInt;
         }
         else if (type==vtFloat)
         {
            if (hash->store==hashInt || hash->store==hashFloat) 
               want =hashFloat;
         }
         else if (type==vtString)
         {
            if (hash->store==hashString)
               want = hashString;
         }
      }
      if (hash->store!=want)
      {
         hash = hash->convertStore(want);
         ioHash = hash;
      }
   }

   ioHash.mPtr = hash->set(inKey,value);
}
开发者ID:flowplay,项目名称:hxcpp,代码行数:60,代码来源:Hash.cpp

示例7: convert

void PowerTabOldImporter::convert(const PowerTabDocument::Dynamic &oldDynamic,
                                  Dynamic &dynamic)
{
    dynamic.setPosition(oldDynamic.GetPosition());
    dynamic.setVolume(static_cast<Dynamic::VolumeLevel>(
                          oldDynamic.GetStaffVolume()));
}
开发者ID:powertab,项目名称:powertabeditor,代码行数:7,代码来源:powertaboldimporter.cpp

示例8: null

hx::Val Class_obj::__Field(const String &inString, hx::PropertyAccess inCallProp)
{
   if (inString==HX_CSTRING("__meta__"))
      return __meta__;
   #if (HXCPP_API_LEVEL>320)
   if (inString==HX_CSTRING("__rtti"))
      return __rtti__;
   #endif

   if (mGetStaticField)
   {
      Dynamic result;
      if (mGetStaticField(inString,result,inCallProp))
         return result;
 
      // Throw ?
      return null();
   }

   // Not the most efficient way of doing this!
   if (!mConstructEmpty)
      return null();
   Dynamic instance = mConstructEmpty();
   return instance->__Field(inString, inCallProp);
}
开发者ID:KTXSoftware,项目名称:KodeStudio-win32,代码行数:25,代码来源:Class.cpp

示例9: Palette

void MuseScore::dynamicsMenu()
      {
      if (dynamicsPalette == 0) {
            Palette* sp = new Palette();
            dynamicsPalette = new PaletteScrollArea(sp);
            dynamicsPalette->setRestrictHeight(false);
            dynamicsPalette->setWindowTitle(tr("MuseScore: Dynamics"));
            sp->setGrid(90, 40);
            sp->resize(300, 200);

            for (int i = 0; i < 27; ++i) {
                  Dynamic* dynamic = new Dynamic(gscore);
                  dynamic->setSubtype(dynList[i + 1].tag);
                  sp->append(dynamic, dynamic->subtypeName());
                  }

            const char* expr[] = {
                  "crescendo", "diminuendo", "dolce", "espressivo",
                  "legato", "leggiero", "marcato", "mero", "molto"
                  };
            for (unsigned int i = 0; i < sizeof(expr) / sizeof(*expr); ++i) {
                  Dynamic* d = new Dynamic(gscore);
                  d->setSubtype(expr[i]);
                  sp->append(d,  expr[i]);
                  }
            }
      dynamicsPalette->show();
      dynamicsPalette->raise();
      }
开发者ID:Mistobaan,项目名称:MuseScore,代码行数:29,代码来源:menus.cpp

示例10: HX_STACK_PUSH

Void Tweener_obj::updateTweens( ){
{
		HX_STACK_PUSH("Tweener::updateTweens","com/haxepunk/Tweener.hx",101);
		HX_STACK_THIS(this);
		HX_STACK_LINE(102)
		::com::haxepunk::Tween t;		HX_STACK_VAR(t,"t");
		Dynamic ft = this->_tween;		HX_STACK_VAR(ft,"ft");
		HX_STACK_LINE(104)
		while(((ft != null()))){
			HX_STACK_LINE(106)
			t = hx::TCast< com::haxepunk::Tween >::cast(ft);
			HX_STACK_LINE(107)
			if ((t->active)){
				HX_STACK_LINE(109)
				t->update();
				HX_STACK_LINE(110)
				if ((ft->__Field(HX_CSTRING("_finish"),true))){
					HX_STACK_LINE(110)
					ft->__Field(HX_CSTRING("finish"),true)();
				}
			}
			HX_STACK_LINE(112)
			ft = ft->__Field(HX_CSTRING("_next"),true);
		}
	}
开发者ID:DrSkipper,项目名称:twogames,代码行数:25,代码来源:Tweener.cpp

示例11: HX_STACK_PUSH

::com::eclecticdesignstudio::motion::actuators::IGenericActuator TransformOptions_obj::color( hx::Null< Float >  __o_value,hx::Null< Float >  __o_strength,Dynamic alpha) {
    Float value = __o_value.Default(0);
    Float strength = __o_strength.Default(1);
    HX_STACK_PUSH("TransformOptions::color","com/eclecticdesignstudio/motion/Actuate.hx",500);
    HX_STACK_THIS(this);
    HX_STACK_ARG(value,"value");
    HX_STACK_ARG(strength,"strength");
    HX_STACK_ARG(alpha,"alpha");
    {
        struct _Function_1_1 {
            inline static Dynamic Block( Float &value,Float &strength) {
                HX_STACK_PUSH("*::closure","com/eclecticdesignstudio/motion/Actuate.hx",502);
                {
                    hx::Anon __result = hx::Anon_obj::Create();
                    __result->Add(HX_CSTRING("colorValue") , value,false);
                    __result->Add(HX_CSTRING("colorStrength") , strength,false);
                    return __result;
                }
                return null();
            }
        };
        HX_STACK_LINE(502)
        Dynamic properties = _Function_1_1::Block(value,strength);
        HX_STACK_VAR(properties,"properties");
        HX_STACK_LINE(504)
        if (((alpha != null()))) {
            HX_STACK_LINE(504)
            properties->__FieldRef(HX_CSTRING("colorAlpha")) = alpha;
        }
        HX_STACK_LINE(510)
        return ::com::eclecticdesignstudio::motion::Actuate_obj::tween(this->target,this->duration,properties,this->overwrite,hx::ClassOf< ::com::eclecticdesignstudio::motion::actuators::TransformActuator >());
    }
}
开发者ID:bloognoo,项目名称:smurnal,代码行数:33,代码来源:TransformOptions.cpp

示例12: null

Dynamic Class_obj::__SetField(const String &inString,const Dynamic &inValue, bool inCallProp)
{
   // Not the most efficient way of doing this!
   if (!mConstructEmpty)
      return null();
   Dynamic instance = mConstructEmpty();
   return instance->__SetField(inString,inValue, inCallProp);
}
开发者ID:FoxInFreefall,项目名称:ghostbutter,代码行数:8,代码来源:Class.cpp

示例13: __string_hash_set

void __string_hash_set(Dynamic &ioHash,String inKey,const Dynamic &value)
{
   StringHashBase *hash = static_cast<StringHashBase *>(ioHash.GetPtr());
   if (!hash)
   {
      if (value==null())
      {
         hash = new StringHashObject();
      }
      else
      {
         ObjectType type = (ObjectType)value->__GetType();
         if (type==vtBool || type==vtInt)
         {
            hash = new StringHashInt();
         }
         else if (type==vtFloat)
            hash = new StringHashFloat();
         else if (type==vtString)
            hash = new StringHashString();
         else
            hash = new StringHashObject();
      }
      ioHash = hash;
   }
   else if (hash->store!=hashObject)
   {
      HashStore want = hashObject;
      if (value!=null())
      {
         ObjectType type = (ObjectType)value->__GetType();
         if (type==vtBool || type==vtInt)
         {
            if (hash->store==hashFloat)
               want = hashFloat;
            else if (hash->store==hashInt)
               want = hashInt;
         }
         else if (type==vtFloat)
         {
            if (hash->store==hashInt || hash->store==hashFloat) 
               want =hashFloat;
         }
         else if (type==vtString)
         {
            if (hash->store==hashString)
               want = hashString;
         }
      }
      if (hash->store!=want)
      {
         hash = hash->convertStore(want);
         ioHash = hash;
      }
   }

   hash->set(inKey,value);
}
开发者ID:cbatson,项目名称:hxcpp,代码行数:58,代码来源:Hash.cpp

示例14: TimedDynamic

void Lex::TimedDynamic(void)
{
	Dynamic *d;

	d = f_dynamics;
	while(d != f_start_dynamics) {
		d->SetTimed();
		d = d->Next();
	}
}
开发者ID:m2osw,项目名称:turnwatcher,代码行数:10,代码来源:async_functions.cpp

示例15: __hxcpp_same_closure

bool __hxcpp_same_closure(Dynamic &inF1,Dynamic &inF2)
{
   hx::Object *p1 = inF1.GetPtr();
   hx::Object *p2 = inF2.GetPtr();
   if (p1==0 || p2==0)
      return false;
   if ( (p1->__GetHandle() != p2->__GetHandle()))
      return false;
   return p1->__Compare(p2)==0;
}
开发者ID:KTXSoftware,项目名称:khacpp,代码行数:10,代码来源:StdLibs.cpp


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