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


C++ SerializableList::IsEmpty方法代码示例

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


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

示例1: GetAssignedConnections

void wxSFDiagramManager::GetAssignedConnections(wxSFShapeBase* parent, wxClassInfo* shapeInfo, wxSFShapeBase::CONNECTMODE mode, ShapeList& lines)
{
	wxSFLineShape* pLine;
	
	if( parent->GetId() == -1 ) return;

	SerializableList lstLines;
	// lines are children of root item only so we have not to search recursively...
	GetRootItem()->GetChildren( shapeInfo, lstLines );
	
	if( !lstLines.IsEmpty() )
    {
        SerializableList::compatibility_iterator node = lstLines.GetFirst();
        while(node)
        {
            pLine = (wxSFLineShape*)node->GetData();
            switch(mode)
            {
                case wxSFShapeBase::lineSTARTING:
                    if( pLine->GetSrcShapeId() == parent->GetId() ) lines.Append(pLine);
                    break;

                case wxSFShapeBase::lineENDING:
                    if( pLine->GetTrgShapeId() == parent->GetId() ) lines.Append(pLine);
                    break;

                case wxSFShapeBase::lineBOTH:
                    if( ( pLine->GetSrcShapeId() == parent->GetId() ) ||
					    ( pLine->GetTrgShapeId() == parent->GetId() ) ) lines.Append(pLine);
                    break;
            }
            node = node->GetNext();
        }
    }
}
开发者ID:noriter,项目名称:wxWidgets,代码行数:35,代码来源:DiagramManager.cpp

示例2: Contains

bool wxXmlSerializer::Contains(wxClassInfo *type)
{
	SerializableList lstItems;
		
	GetItems( type, lstItems );
		
	return !lstItems.IsEmpty();
}
开发者ID:05storm26,项目名称:codelite,代码行数:8,代码来源:XmlSerializer.cpp

示例3: ProcessClassMembers

void udCPPClassElementProcessor::ProcessClassMembers(wxSFShapeBase* element)
{
	SerializableList lstMembers;
	umlClassDiagram::GetClassMembers( (umlClassItem*)element, CLASSINFO(udMemberDataLinkItem), (udLanguage::ACCESSTYPE)-1, lstMembers );
	
	if( !lstMembers.IsEmpty() )
	{
		udMemberDataItem *pVar;
		udLanguage *pLang = m_pParentGenerator->GetActiveLanguage();
		
		pLang->SingleLineCommentCmd( wxT("member data initialization") );
		
		for( SerializableList::iterator it = lstMembers.begin(); it != lstMembers.end(); ++it )
		{
			pVar = (udMemberDataItem*)((udMemberDataLinkItem*)*it)->GetOriginal();
			if( !pVar->GetValue().IsEmpty() ) pLang->WriteCodeBlocks( pVar->ToString( udCodeItem::cfDEFINITION, pLang ) );
		}
		
		pLang->NewLine();
	}
}
开发者ID:LETARTARE,项目名称:CodeDesigner,代码行数:21,代码来源:CPPElementProcessors.cpp

示例4: ProcessClassDefinition

void udCPPClassElementProcessor::ProcessClassDefinition(wxSFShapeBase* element)
{
	udLanguage *pLang = m_pParentGenerator->GetActiveLanguage();
	
	int nAccessType = 0;
	udFunctionItem *pFcn;
	
	SerializableList lstMembers;
	
	while( pLang->GetAccessTypeString( (udLanguage::ACCESSTYPE) nAccessType ) != wxEmptyString )
	{
		lstMembers.Clear();
		
		umlClassDiagram::GetClassMembers( (umlClassItem*) element, CLASSINFO(udMemberFunctionLinkItem), (udLanguage::ACCESSTYPE) nAccessType, lstMembers);
		
		if( !lstMembers.IsEmpty() )
		{
			pLang->SingleLineCommentCmd( pLang->GetAccessTypeString( (udLanguage::ACCESSTYPE) nAccessType ) + wxT(" function members of '") + udPROJECT::GetDiagramElement(element)->GetName() + wxT("' class") );
		}
		
		for( SerializableList::iterator it = lstMembers.begin(); it != lstMembers.end(); ++it )
		{
			pFcn = (udFunctionItem*)((udCodeLinkItem*)*it)->GetOriginal();
			
			// generate non-abstract functions only
			if( pFcn->GetFunctionModifer() == udLanguage::FM_ABSTRACT ) continue;
			
			// write template definition if needed
			udClassTemplateElementItem *pClassTempl = wxDynamicCast( udPROJECT::GetDiagramElement(element), udClassTemplateElementItem );
			if( pClassTempl )
			{
				pLang->WriteCodeBlocks( wxT("template <typename ") + pClassTempl->GetTemplateName() + wxT(">") );
			}
			
			if( pFcn->GetImplementation() == uddvFUNCTION_USERIMPLEMENTATION )
			{
				pLang->WriteCodeBlocks( pFcn->ToString( udCodeItem::cfDEFINITION, pLang ) );
				pLang->BeginCmd();
				
				if( pFcn->IsKindOf( CLASSINFO(udConstructorFunctionItem) ) ) ProcessClassMembers( element );
				
				/*if( pFcn->GetCode().IsEmpty() ) pLang->WriteCodeBlocks( pLang->Dummy() );
				else
				{*/
					// insert code marks here needed for code synchronization
					pLang->SingleLineCommentCmd( udGenerator::GetBeginCodeMark( pFcn ) );
						
					pLang->WriteCodeBlocks( pFcn->GetCode() );
					
					pLang->SingleLineCommentCmd( udGenerator::GetEndCodeMark( pFcn ) );
					
				/*}*/
					
				pLang->EndCmd();
				pLang->NewLine();
			}
		}
		
		nAccessType++;
	}
}
开发者ID:LETARTARE,项目名称:CodeDesigner,代码行数:61,代码来源:CPPElementProcessors.cpp


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