コード例 #1
0
ファイル: SmokeObject.cpp プロジェクト: NickSpyrison/qtbase
/* Cast the instance pointer to a parent class. This is necessary,
   because the compiler does not know how to cast a void* to a parent
   class when multiple inheritance is involved.
*/
void *
SmokeObject::castPtr(const char *className, bool clone) const {
  Smoke *smoke = this->smoke();
  // Be very careful changing this -- it is written as intended
  return smoke->cast(clone ? clonePtr() : _ptr, classId(),
                     smoke->idClass(className, true).index);
}
コード例 #2
0
ファイル: SmokeObject.cpp プロジェクト: NickSpyrison/qtbase
SmokeObject *SmokeObject::clone() const {
  return SmokeObject::fromPtr(clonePtr(), _klass, true);
}
コード例 #3
0
SerializableNodeRef CScriptSerializableNode::clone() const
{
    return GetNodeRef(clonePtr());
}