Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:20

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 #ifndef _TDF_DataSet_HeaderFile
0017 #define _TDF_DataSet_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 
0021 #include <TDF_LabelList.hxx>
0022 #include <TDF_LabelMap.hxx>
0023 #include <TDF_AttributeMap.hxx>
0024 #include <Standard_Transient.hxx>
0025 #include <Standard_Boolean.hxx>
0026 #include <Standard_OStream.hxx>
0027 class TDF_Label;
0028 class TDF_Attribute;
0029 
0030 
0031 class TDF_DataSet;
0032 DEFINE_STANDARD_HANDLE(TDF_DataSet, Standard_Transient)
0033 
0034 //! This class is a set of TDF information like labels and attributes.
0035 class TDF_DataSet : public Standard_Transient
0036 {
0037 
0038 public:
0039 
0040   
0041   //! Creates an  empty   DataSet  object.
0042   Standard_EXPORT TDF_DataSet();
0043   
0044   //! Clears all information.
0045   Standard_EXPORT void Clear();
0046   
0047   //! Returns true if there is at least one label or one
0048   //! attribute.
0049     Standard_Boolean IsEmpty() const;
0050   
0051   //! Adds <aLabel> in  the  current  data  set.
0052     void AddLabel (const TDF_Label& aLabel);
0053   
0054   //! Returns true if the label  <alabel>   is in the data set.
0055     Standard_Boolean ContainsLabel (const TDF_Label& aLabel) const;
0056   
0057   //! Returns the map of labels in this data set.
0058   //! This map can be used directly, or updated.
0059     TDF_LabelMap& Labels();
0060   
0061   //! Adds <anAttribute> into the current data  set.
0062     void AddAttribute (const Handle(TDF_Attribute)& anAttribute);
0063   
0064   //! Returns true if <anAttribute> is in the data set.
0065     Standard_Boolean ContainsAttribute (const Handle(TDF_Attribute)& anAttribute) const;
0066   
0067   //! Returns the map of attributes in the  current  data   set.
0068   //! This map can be used directly, or updated.
0069     TDF_AttributeMap& Attributes();
0070   
0071   //! Adds a root label to <myRootLabels>.
0072     void AddRoot (const TDF_Label& aLabel);
0073   
0074   //! Returns <myRootLabels> to be used or updated.
0075     TDF_LabelList& Roots();
0076   
0077   //! Dumps the minimum information about <me> on
0078   //! <aStream>.
0079   Standard_EXPORT Standard_OStream& Dump (Standard_OStream& anOS) const;
0080 Standard_OStream& operator<< (Standard_OStream& anOS) const
0081 {
0082   return Dump(anOS);
0083 }
0084 
0085 
0086 
0087 
0088   DEFINE_STANDARD_RTTIEXT(TDF_DataSet,Standard_Transient)
0089 
0090 protected:
0091 
0092 
0093 
0094 
0095 private:
0096 
0097 
0098   TDF_LabelList myRootLabels;
0099   TDF_LabelMap myLabelMap;
0100   TDF_AttributeMap myAttributeMap;
0101 
0102 
0103 };
0104 
0105 
0106 #include <TDF_DataSet.lxx>
0107 
0108 
0109 
0110 
0111 
0112 #endif // _TDF_DataSet_HeaderFile