Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/opencascade/TDF_Label.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     Feb  7 1997     Creation
0021 
0022 #include <TDF_LabelNode.hxx>
0023 #include <TDF_TagSource.hxx>
0024 #include <TDF_Data.hxx>
0025 
0026 namespace std
0027 {
0028   template<>
0029   struct hash<TDF_Label>
0030   {
0031     size_t operator()(const TDF_Label& theNode) const
0032     {
0033       return std::hash<TDF_LabelNodePtr>{}(theNode.myLabelNode);
0034     }
0035   };
0036 }
0037 
0038 inline TDF_Label::TDF_Label()
0039 :myLabelNode(NULL)
0040 {}
0041 
0042 inline TDF_Label::TDF_Label(const TDF_LabelNodePtr& aNode)
0043 :myLabelNode(aNode)
0044 {}
0045 
0046 inline void TDF_Label::Nullify()
0047 { myLabelNode = NULL; }
0048 
0049 inline Standard_Boolean TDF_Label::IsRoot() const
0050 { return myLabelNode->IsRoot(); }
0051 
0052 inline Standard_Boolean TDF_Label::IsNull() const
0053 { return (myLabelNode == NULL); }
0054 
0055 inline Standard_Boolean TDF_Label::IsImported() const
0056 { return myLabelNode->IsImported(); }
0057 
0058 inline Standard_Boolean TDF_Label::IsEqual(const TDF_Label& aLabel) const
0059 { return (myLabelNode == aLabel.myLabelNode); }
0060 
0061 inline Standard_Boolean TDF_Label::IsDifferent(const TDF_Label& aLabel) const
0062 { return (myLabelNode != aLabel.myLabelNode); }
0063 
0064 inline Standard_Integer TDF_Label::Tag() const
0065 { return myLabelNode->Tag(); }
0066 
0067 inline const TDF_Label TDF_Label::Father() const
0068 { return TDF_Label(myLabelNode->Father()); }
0069 
0070 inline Standard_Boolean TDF_Label::HasChild() const
0071 { return (myLabelNode->FirstChild() != NULL); }
0072 
0073 inline Standard_Boolean TDF_Label::AttributesModified() const
0074 { return myLabelNode->AttributesModified(); }
0075 
0076 inline Standard_Boolean TDF_Label::MayBeModified() const
0077 { return myLabelNode->MayBeModified(); }
0078 
0079 inline Handle(TDF_Data) TDF_Label::Data() const
0080 { return myLabelNode->Data(); }
0081 
0082 inline Standard_OStream& operator << (Standard_OStream& anOS,
0083                                       const TDF_Label& aLab)
0084 { aLab.Dump(anOS); return anOS; }
0085 
0086 inline TDF_Label TDF_Label::NewChild () const
0087 { return TDF_TagSource::NewChild(*this); }