本文整理汇总了C++中PProperty::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ PProperty::GetName方法的具体用法?C++ PProperty::GetName怎么用?C++ PProperty::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PProperty
的用法示例。
在下文中一共展示了PProperty::GetName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SerializeObject
void ObjectBase::SerializeObject( ticpp::Element* serializedElement )
{
ticpp::Element element( "object" );
element.SetAttribute( "class", _STDSTR( GetClassName() ) );
element.SetAttribute( "expanded", GetExpanded() );
for ( unsigned int i = 0; i < GetPropertyCount(); i++ )
{
PProperty prop = GetProperty( i );
ticpp::Element prop_element( "property" );
prop_element.SetAttribute( "name", _STDSTR( prop->GetName() ) );
prop_element.SetText( _STDSTR( prop->GetValue() ) );
element.LinkEndChild( &prop_element );
}
for ( unsigned int i = 0; i < GetEventCount(); i++ )
{
PEvent event = GetEvent( i );
ticpp::Element event_element( "event" );
event_element.SetAttribute( "name", _STDSTR( event->GetName() ) );
event_element.SetText( _STDSTR( event->GetValue() ) );
element.LinkEndChild( &event_element );
}
for ( unsigned int i = 0 ; i < GetChildCount(); i++ )
{
PObjectBase child = GetChild( i );
ticpp::Element child_element;
child->SerializeObject( &child_element );
element.LinkEndChild( &child_element );
}
*serializedElement = element;
}
示例2: GetObject
void
PropEnumEditor::HandleEdit(int32 value)
{
PObject *obj = GetObject();
PProperty *prop = obj->FindProperty(fPropName->String());
obj->SetIntProperty(fPropName->String(),value);
BMessage *editMsg = new BMessage(M_PROPERTY_EDITED);
if (obj && prop)
{
editMsg->AddPointer("object",obj);
editMsg->AddPointer("property",prop);
editMsg->AddInt64("objectid",obj->GetID());
editMsg->AddString("name",prop->GetName());
*fPropName = prop->GetName();
}
fMsgr->SendMessage(editMsg);
}
示例3: AddProperty
void ObjectBase::AddProperty (PProperty prop)
{
m_properties.insert( PropertyMap::value_type( prop->GetName(), prop ) );
}