本文整理汇总了C++中SerializableList::Append方法的典型用法代码示例。如果您正苦于以下问题:C++ SerializableList::Append方法的具体用法?C++ SerializableList::Append怎么用?C++ SerializableList::Append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SerializableList
的用法示例。
在下文中一共展示了SerializableList::Append方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetConstraints
void TableSettings::GetConstraints(SerializableList& keys, const wxString& localcol)
{
for( SerializableList::iterator it = m_lstKeys.begin();
it != m_lstKeys.end(); ++it ) {
Constraint *c = wxDynamicCast( *it, Constraint );
if( c && ( c->GetLocalColumn() == localcol ) ) keys.Append( *it );
}
}
示例2: GetChildren
void xsSerializable::GetChildren(wxClassInfo *type, SerializableList& list)
{
xsSerializable *pChild;
SerializableList::compatibility_iterator node = m_lstChildItems.GetFirst();
while(node)
{
pChild = node->GetData();
if( !type || pChild->IsKindOf(type) ) list.Append(pChild);
node = node->GetNext();
}
}
示例3: GetChildrenRecursively
void xsSerializable::GetChildrenRecursively(wxClassInfo *type, SerializableList& list, SEARCHMODE mode)
{
xsSerializable *pChild;
SerializableList::compatibility_iterator node = m_lstChildItems.GetFirst();
while(node)
{
pChild = node->GetData();
if( !type || pChild->IsKindOf(type) ) list.Append(pChild);
if( mode == searchDFS ) pChild->GetChildrenRecursively(type, list);
node = node->GetNext();
}
if( mode == searchBFS )
{
node = m_lstChildItems.GetFirst();
while(node)
{
node->GetData()->GetChildrenRecursively(type, list);
node = node->GetNext();
}
}
}
示例4: _DeserializeObjects
void wxSFDiagramManager::_DeserializeObjects(xsSerializable* parent, wxXmlNode* node)
{
wxSFShapeBase *pShape;
wxXS::IntArray arrNewIDs;
SerializableList lstForUpdate;
wxXmlNode* shapeNode = node->GetChildren();
while(shapeNode)
{
if(shapeNode->GetName() == wxT("object"))
{
#if wxVERSION_NUMBER < 2900
pShape = AddShape((wxSFShapeBase*)wxCreateDynamicObject(shapeNode->GetPropVal(wxT("type"), wxT(""))), parent, wxPoint(0, 0), true, sfDONT_SAVE_STATE);
#else
pShape = AddShape((wxSFShapeBase*)wxCreateDynamicObject(shapeNode->GetAttribute(wxT("type"), wxT(""))), parent, wxPoint(0, 0), true, sfDONT_SAVE_STATE);
#endif
if(pShape)
{
// store new assigned ID
lstForUpdate.Append( pShape );
pShape->GetChildrenRecursively( NULL, lstForUpdate );
for( SerializableList::iterator it = lstForUpdate.begin(); it != lstForUpdate.end(); ++it )
{
arrNewIDs.Add( (*it)->GetId() );
}
// deserialize stored content
pShape->DeserializeObject(shapeNode);
// update handle in line shapes
if( pShape->IsKindOf( CLASSINFO(wxSFLineShape) ) )
{
pShape->CreateHandles();
m_lstLinesForUpdate.Append(pShape);
}
else if( pShape->IsKindOf( CLASSINFO(wxSFGridShape) ) )
{
m_lstGridsForUpdate.Append(pShape);
}
// store information about IDs' changes and re-assign shapes' IDs
int newId, i = 0;
for( SerializableList::iterator it = lstForUpdate.begin(); it != lstForUpdate.end(); ++it )
{
newId = arrNewIDs[i++];
if( newId != (*it)->GetId() )
{
m_lstIDPairs.Append( new IDPair((*it)->GetId(), newId) );
(*it)->SetId( newId );
}
}
// deserialize child objects
_DeserializeObjects(pShape, shapeNode);
arrNewIDs.Clear();
lstForUpdate.Clear();
}
else
{
// there are some unsupported shapes so the diagrams must be cleared because of possible damage
RemoveAll();
m_lstLinesForUpdate.Clear();
m_lstGridsForUpdate.Clear();
wxMessageBox( wxT("Deserialization couldn't be completed because not of all shapes are accepted."), wxT("wxShapeFramework"), wxOK | wxICON_WARNING );
return;
}
}
else if(shapeNode->GetName() == m_sRootName + wxT("_properties"))
{
m_pRoot->DeserializeObject(shapeNode->GetChildren());
}
shapeNode = shapeNode->GetNext();
}
}