本文整理汇总了C++中xml::Node::Name方法的典型用法代码示例。如果您正苦于以下问题:C++ Node::Name方法的具体用法?C++ Node::Name怎么用?C++ Node::Name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xml::Node
的用法示例。
在下文中一共展示了Node::Name方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProtoDeSerialize
void ActorRigid::ProtoDeSerialize(const XML::Node& OneNode)
{
if ( Mezzanine::String(OneNode.Name())==this->ActorRigid::SerializableName() )
{
if(OneNode.GetAttribute("Version").AsInt() == 1)
{
this->ActorBase::ProtoDeSerialize(OneNode.GetChild(this->ActorBase::SerializableName()));
Vector3 TempVec;
XML::Node LinearMovementFactor = OneNode.GetChild("LinearMovementFactor").GetFirstChild();
if(!LinearMovementFactor)
{ DeSerializeError("locate LinearMovementFactor node",SerializableName()); }
TempVec.ProtoDeSerialize(LinearMovementFactor);
this->SetLinearMovementFactor(TempVec);
XML::Node AngularMovementFactor = OneNode.GetChild("AngularMovementFactor").GetFirstChild();
if(!AngularMovementFactor)
{ DeSerializeError("locate AngularMovementFactor node",SerializableName()); }
TempVec.ProtoDeSerialize(AngularMovementFactor);
this->SetAngularMovementFactor(TempVec);
// could not do Name, File, Group - done in ActorDeSerializer
}else{
DeSerializeError("find usable serialization version",SerializableName());
}
}else{
DeSerializeError(String("find correct class to deserialize, found a ")+OneNode.Name(),SerializableName());
}
}
示例2: ProtoDeSerialize
void WorldObject::ProtoDeSerialize(const XML::Node& OneNode)
{
if ( Mezzanine::String(OneNode.Name())==this->WorldObject::SerializableName() )
{
if(OneNode.GetAttribute("Version").AsInt() == 1)
{
Vector3 TempVec;
XML::Node LocationNode = OneNode.GetChild("Location").GetFirstChild();
if(!LocationNode)
{ DeSerializeError("locate Location node",SerializableName()); }
TempVec.ProtoDeSerialize(LocationNode);
this->SetLocation(TempVec);
XML::Node GraphicsSettingsNode = OneNode.GetChild(this->GraphicsSettingsSerializableName());
if(!GraphicsSettingsNode)
{ DeSerializeError("locate Graphics Settings node",SerializableName()); }
this->GetGraphicsSettings()->ProtoDeSerialize(GraphicsSettingsNode);
XML::Node PhysicsSettingsNode = OneNode.GetChild(this->PhysicsSettingsSerializableName());
if(!PhysicsSettingsNode)
{ DeSerializeError(String("locate Physics Settings node, ")+this->PhysicsSettingsSerializableName()+", ",SerializableName()); }
this->GetPhysicsSettings()->ProtoDeSerialize(PhysicsSettingsNode);
XML::Node ScalingNode = OneNode.GetChild("Scaling").GetFirstChild();
if(!ScalingNode)
{ DeSerializeError("locate Scaling node",SerializableName()); }
TempVec.ProtoDeSerialize(ScalingNode);
this->SetScaling(TempVec);
if( this->IsInWorld() != OneNode.GetAttribute("IsInWorld").AsBool() )
{
if(this->IsInWorld())
{ this->RemoveFromWorld(); }
else
{ this->AddToWorld(); }
}
/*if( 0!=OneNode.GetAttribute("SoundSet") && ""!=OneNode.GetAttribute("SoundSet").AsString())
{ this->ObjectSounds = Audio::AudioManager::GetSingletonPtr()->GetSoundSet(OneNode.GetAttribute("SoundSet").AsString()); }
else
{ this->ObjectSounds = 0; }//*/
}else{
DeSerializeError("find usable serialization version",SerializableName());
}
}else{
DeSerializeError(String("find correct class to deserialize, found a ")+OneNode.Name(),SerializableName());
}
}
示例3: ProtoDeSerialize
void GearConstraint::ProtoDeSerialize(const XML::Node& OneNode)
{
if ( Mezzanine::String(OneNode.Name())==this->GearConstraint::SerializableName() )
{
if(OneNode.GetAttribute("Version").AsInt() == 1)
{
this->Constraint::ProtoDeSerialize(OneNode.GetChild("Constraint"));
this->SetRotationRatio(OneNode.GetAttribute("Ratio").AsReal());
XML::Node ActorANode = OneNode.GetChild("ActorA");
if(!ActorANode)
{ DeSerializeError("Could not find ActorA axis",SerializableName()); }
XML::Node ActorBNode = OneNode.GetChild("ActorB");
if(!ActorBNode)
{ DeSerializeError("Could not find ActorB axis",SerializableName()); }
Vector3 temp;
temp.ProtoDeSerialize(ActorANode.GetFirstChild());
this->SetAxisA(temp);
temp.ProtoDeSerialize(ActorBNode.GetFirstChild());
this->SetAxisB(temp);
}else{
DeSerializeError("find usable serialization version",SerializableName());
}
}else{
DeSerializeError(String("find correct class to deserialize, found a ")+OneNode.Name(),SerializableName());
}
}
示例4: ProtoDeSerialize
void CapsuleCollisionShape::ProtoDeSerialize(const XML::Node& OneNode)
{
if ( Mezzanine::String(OneNode.Name())==this->CapsuleCollisionShape::GetSerializableName() )
{
if(OneNode.GetAttribute("Version").AsInt() == 1)
{
XML::Node CollisionNode = OneNode.GetChild(this->PrimitiveCollisionShape::GetSerializableName());
if(!CollisionNode)
{
DeSerializeError("locate PrimitiveCollisionShape node",GetSerializableName());
}
this->PrimitiveCollisionShape::ProtoDeSerialize(CollisionNode);
} else {
DeSerializeError("find usable serialization version",GetSerializableName());
}
} else {
DeSerializeError(String("find correct class to deserialize, found a ")+OneNode.Name(),GetSerializableName());
}
}
示例5: ProtoDeSerialize
void AreaEffect::ProtoDeSerialize(const XML::Node& OneNode)
{
if ( Mezzanine::String(OneNode.Name())==this->AreaEffect::SerializableName() )
{
if(OneNode.GetAttribute("Version").AsInt() == 1)
{
NonStaticWorldObject::ProtoDeSerialize(OneNode.GetChild(this->NonStaticWorldObject::SerializableName()));
}
}
}
示例6: ProtoDeSerialize
void Transform::ProtoDeSerialize(const XML::Node& OneNode)
{
if ( Mezzanine::String(OneNode.Name())==Mezzanine::String(SerializableName()) )
{
if(OneNode.GetAttribute("Version").AsInt() == 1)
{
this->Location.ProtoDeSerialize(OneNode.GetChild("Vector3"));
this->Rotation.ProtoDeSerialize(OneNode.GetChild("Quaternion"));
}else{
MEZZ_EXCEPTION(Exception::INVALID_VERSION_EXCEPTION,"Incompatible XML Version for " + SerializableName() + ": Not Version 1.");
}
}else{
MEZZ_EXCEPTION(Exception::II_IDENTITY_INVALID_EXCEPTION,"Attempting to deserialize a " + SerializableName() + ", found a " + String(OneNode.Name()));
}
}