1 // File : SALOMEDSImpl_SComponent.cxx
2 // Author : Sergey RUIN
6 #include "SALOMEDSImpl_SComponent.hxx"
7 #include "SALOMEDSImpl_AttributeComment.hxx"
8 #include "SALOMEDSImpl_AttributeIOR.hxx"
12 IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_SComponent, SALOMEDSImpl_SObject )
13 IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_SComponent, SALOMEDSImpl_SObject )
15 //============================================================================
16 /*! Function : constructor
19 //============================================================================
20 SALOMEDSImpl_SComponent::SALOMEDSImpl_SComponent(const TDF_Label& theLabel)
21 :SALOMEDSImpl_SObject(theLabel)
25 //============================================================================
26 /*! Function : destructor
29 //============================================================================
30 SALOMEDSImpl_SComponent::~SALOMEDSImpl_SComponent()
34 //============================================================================
35 /*! Function : ComponentDataType
38 //============================================================================
39 TCollection_AsciiString SALOMEDSImpl_SComponent::ComponentDataType()
41 TCollection_AsciiString res = "";
42 Handle(SALOMEDSImpl_AttributeComment) type;
43 if ( _lab.FindAttribute(SALOMEDSImpl_AttributeComment::GetID(),type) ) {
51 //============================================================================
52 /*! Function : ComponentIOR
55 //============================================================================
56 bool SALOMEDSImpl_SComponent::ComponentIOR(TCollection_AsciiString& IOR)
58 Handle(SALOMEDSImpl_AttributeIOR) ior;
59 if (!_lab.FindAttribute(SALOMEDSImpl_AttributeIOR::GetID(),ior) )
66 //============================================================================
70 //============================================================================
71 bool SALOMEDSImpl_SComponent::IsA(const TDF_Label& theLabel)
73 // scomponent must contain comment and belong to the 2th depth label
74 if ( theLabel.IsAttribute(SALOMEDSImpl_AttributeComment::GetID()) && theLabel.Depth() == 2) {