Salome HOME
PR: merge from branch BR_UnitTests tag mergeto_trunk_17oct05
[modules/yacs.git] / src / SALOMEDS / SALOMEDS_SObject.hxx
1 //  File   : SALOMEDS_SObject.hxx
2 //  Author : Sergey RUIN
3 //  Module : SALOME
4
5 #ifndef __SALOMEDS_SOBJECT_H__
6 #define __SALOMEDS_SOBJECT_H__
7
8 // std C++ headers
9 #include <vector>
10
11 #include <SALOMEDSClient.hxx>
12
13 // IDL headers
14 #include <SALOMEconfig.h>
15 #include CORBA_SERVER_HEADER(SALOMEDS)
16
17 #include "SALOMEDS_SObject_i.hxx"
18 #include "SALOMEDSImpl_SObject.hxx"
19
20 class Standard_EXPORT SALOMEDS_SObject: public virtual SALOMEDSClient_SObject
21 {
22 protected:
23
24   bool                         _isLocal;
25   Handle(SALOMEDSImpl_SObject) _local_impl;
26   SALOMEDS::SObject_var        _corba_impl;
27   CORBA::ORB_var               _orb;
28
29 public:
30   
31   SALOMEDS_SObject(SALOMEDS::SObject_ptr theSObject);
32   SALOMEDS_SObject(const Handle(SALOMEDSImpl_SObject)& theSObject);       
33   virtual ~SALOMEDS_SObject();
34
35   virtual std::string GetID();
36   virtual _PTR(SComponent) GetFatherComponent();
37   virtual _PTR(SObject)    GetFather();
38   virtual bool FindAttribute(_PTR(GenericAttribute)& anAttribute, const std::string& aTypeOfAttribute);
39   virtual bool ReferencedObject(_PTR(SObject)& theObject);
40   virtual bool FindSubObject(int theTag, _PTR(SObject)& theObject);
41   virtual _PTR(Study) GetStudy();
42   virtual std::string Name();
43   virtual void  Name(const std::string& theName);
44   virtual vector<_PTR(GenericAttribute)> GetAllAttributes();
45   virtual std::string GetName();
46   virtual std::string GetComment();
47   virtual std::string GetIOR();
48   virtual int   Tag();
49   virtual int   Depth();
50
51   CORBA::Object_ptr GetObject();
52   SALOMEDS::SObject_ptr GetSObject();
53
54   SALOMEDS::SObject_ptr        GetCORBAImpl() { return SALOMEDS::SObject::_duplicate(_corba_impl); }
55   Handle(SALOMEDSImpl_SObject) GetLocalImpl() { return _local_impl; } 
56
57 private:
58   void init_orb();
59 };
60
61 #endif