Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/opencascade/TDF_DataSet.lxx is written in an unsupported language. File is not indexed.

0001 // Created by: DAUTRY Philippe
0002 // Copyright (c) 1997-1999 Matra Datavision
0003 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 //              ---------------
0017 
0018 // Version:     0.0
0019 // Version      Date            Purpose
0020 //              0.0     Mar 11 1997     Creation
0021 
0022 #include <TDF_Label.hxx>
0023 #include <TDF_Attribute.hxx>
0024 
0025 // IsEmpty
0026 //=========
0027 inline bool TDF_DataSet::IsEmpty() const
0028 {
0029   return (myLabelMap.IsEmpty() && myAttributeMap.IsEmpty());
0030 }
0031 
0032 // Labels
0033 //========
0034 inline void TDF_DataSet::AddLabel(const TDF_Label& aLabel)
0035 {
0036   if (!aLabel.IsNull())
0037     myLabelMap.Add(aLabel);
0038 }
0039 
0040 inline bool TDF_DataSet::ContainsLabel(const TDF_Label& aLabel) const
0041 {
0042   return myLabelMap.Contains(aLabel);
0043 }
0044 
0045 inline NCollection_Map<TDF_Label>& TDF_DataSet::Labels()
0046 {
0047   return myLabelMap;
0048 }
0049 
0050 // Attributes
0051 //============
0052 
0053 inline void TDF_DataSet::AddAttribute(const occ::handle<TDF_Attribute>& anAttribute)
0054 {
0055   if (!anAttribute.IsNull())
0056     myAttributeMap.Add(anAttribute);
0057 }
0058 
0059 inline bool TDF_DataSet::ContainsAttribute(const occ::handle<TDF_Attribute>& anAttribute) const
0060 {
0061   return myAttributeMap.Contains(anAttribute);
0062 }
0063 
0064 inline NCollection_Map<occ::handle<TDF_Attribute>>& TDF_DataSet::Attributes()
0065 {
0066   return myAttributeMap;
0067 }
0068 
0069 // Root labels
0070 //=============
0071 
0072 inline void TDF_DataSet::AddRoot(const TDF_Label& aLabel)
0073 {
0074   if (ContainsLabel(aLabel))
0075     myRootLabels.Append(aLabel);
0076 }
0077 
0078 inline NCollection_List<TDF_Label>& TDF_DataSet::Roots()
0079 {
0080   return myRootLabels;
0081 }