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


C++ Dynamic::GetPtr方法代码示例

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


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

示例1: __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

示例2: __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

示例3: __string_hash_to_string

String __string_hash_to_string(Dynamic &ioHash)
{
   StringHashBase *hash = static_cast<StringHashBase *>(ioHash.GetPtr());
   if (hash)
      return hash->toString();
   return HX_CSTRING("{}");
}
开发者ID:flowplay,项目名称:hxcpp,代码行数:7,代码来源:Hash.cpp

示例4: __string_hash_remove

bool  __string_hash_remove(Dynamic &ioHash,String inKey)
{
   StringHashBase *hash = static_cast<StringHashBase *>(ioHash.GetPtr());
   if (!hash)
      return false;
   return hash->remove(inKey);
}
开发者ID:flowplay,项目名称:hxcpp,代码行数:7,代码来源:Hash.cpp

示例5: __object_hash_remove

bool  __object_hash_remove(Dynamic &ioHash,Dynamic inKey)
{
   DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr());
   if (!hash)
      return false;
   return hash->remove(inKey);
}
开发者ID:cbatson,项目名称:hxcpp,代码行数:7,代码来源:Hash.cpp

示例6: __string_hash_to_string_raw

String __string_hash_to_string_raw(Dynamic &ioHash)
{
   StringHashBase *hash = static_cast<StringHashBase *>(ioHash.GetPtr());
   if (hash)
      return hash->toStringRaw();
   return null();
}
开发者ID:flowplay,项目名称:hxcpp,代码行数:7,代码来源:Hash.cpp

示例7:

Array<Dynamic> __object_hash_keys(Dynamic &ioHash)
{
   DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr());
   if (!hash)
      return Array_obj<String>::__new();
   return hash->keys();
}
开发者ID:flowplay,项目名称:hxcpp,代码行数:7,代码来源:Hash.cpp

示例8: __object_hash_values

Dynamic __object_hash_values(Dynamic &ioHash)
{
   DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr());
   if (!hash)
      return Array_obj<Dynamic>::__new();
   return hash->values();
}
开发者ID:flowplay,项目名称:hxcpp,代码行数:7,代码来源:Hash.cpp

示例9: __int_hash_remove

bool  __int_hash_remove(Dynamic &ioHash,int inKey)
{
   IntHashBase *hash = static_cast<IntHashBase *>(ioHash.GetPtr());
   if (!hash)
      return false;
   return hash->remove(inKey);
}
开发者ID:flowplay,项目名称:hxcpp,代码行数:7,代码来源:Hash.cpp

示例10: __object_hash_to_string

String __object_hash_to_string(Dynamic &ioHash)
{
   DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr());
   if (hash)
      return hash->toString();
   return String();

}
开发者ID:cbatson,项目名称:hxcpp,代码行数:8,代码来源:Hash.cpp

示例11: __int_hash_to_string

String __int_hash_to_string(Dynamic &ioHash)
{
   IntHashBase *hash = static_cast<IntHashBase *>(ioHash.GetPtr());
   if (hash)
      return hash->toString();
   return String();

}
开发者ID:cbatson,项目名称:hxcpp,代码行数:8,代码来源:Hash.cpp

示例12: __object_hash_exists

bool  __object_hash_exists(Dynamic &ioHash,Dynamic inKey)
{
   toRealObject(inKey);
   DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr());
   if (!hash)
      return false;
   return hash->exists(inKey);
}
开发者ID:flowplay,项目名称:hxcpp,代码行数:8,代码来源:Hash.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: __object_hash_get

Dynamic  __object_hash_get(Dynamic &ioHash,Dynamic inKey)
{
   DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr());
   if (!hash)
      return null();

   Dynamic result = null();
   hash->query(inKey,result);
   return result;
}
开发者ID:cbatson,项目名称:hxcpp,代码行数:10,代码来源:Hash.cpp

示例15: __string_hash_get

Dynamic  __string_hash_get(Dynamic &ioHash,String inKey)
{
   StringHashBase *hash = static_cast<StringHashBase *>(ioHash.GetPtr());
   if (!hash)
      return null();

   Dynamic result = null();
   hash->query(inKey,result);
   return result;
}
开发者ID:flowplay,项目名称:hxcpp,代码行数:10,代码来源:Hash.cpp


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