#include <TDocStd_Document.hxx>
#include <Standard_GUID.hxx>
+#include "SALOMEDS_Study_i.hxx"
+
// IDL headers
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS)
-class SALOMEDS_Study_i;
class SALOMEDS_GenericAttribute_i;
public virtual PortableServer::RefCountServantBase
{
public:
- static SALOMEDS_SObject_i* New(SALOMEDS_Study_i* theStudy,
- const TDF_Label& theLabel);
+ static
+ SALOMEDS_Study_i::TSObjectHolder
+ New(SALOMEDS_Study_i* theStudy,
+ const TDF_Label& theLabel);
+
+ static
+ SALOMEDS_SObject_i*
+ NewPtr(SALOMEDS_Study_i* theStudy,
+ const TDF_Label& theLabel);
+
+ static
+ SALOMEDS::SObject_var
+ NewRef(SALOMEDS_Study_i* theStudy,
+ const TDF_Label& theLabel);
virtual SALOMEDS::SObject_ptr GetFather() ;
virtual SALOMEDS::SComponent_ptr GetFatherComponent();
FindOrCreateAttribute(const char* theTypeOfAttribute);
void RemoveAttribute(const char* theTypeOfAttribute);
+ void OnRemove();
SALOMEDS_Study_i* GetStudyServant(){ return _study;}
+ TDF_Label GetLabel(){ return _lab;}
+ TDF_Label GetFatherLabel(){ return _lab.Father();}
+ TDF_Label GetFatherComponentLabel();
+
CORBA::ORB_var GetORB() const;
PortableServer::POA_var GetPOA() const;
protected:
friend class SALOMEDS_GenericAttribute_i;
- SALOMEDS_GenericAttribute_i*
+ typedef std::string TAttributeID;
+ typedef std::pair<SALOMEDS_GenericAttribute_i*,SALOMEDS::GenericAttribute_var> TAttrHolder;
+ typedef std::map<TAttributeID,TAttrHolder> TAttrMap;
+ TAttrMap myAttrMap;
+
+ TAttrHolder
_FindGenAttribute(const Handle(TDF_Attribute)& theAttr);
- SALOMEDS_GenericAttribute_i*
+ TAttrHolder
_CreateGenAttribute(const Handle(TDF_Attribute)& theAttr,
const char* theTypeOfAttribute);
- SALOMEDS_GenericAttribute_i*
+ TAttrHolder
_FindGenAttribute(const char* theTypeOfAttribute);
- SALOMEDS::GenericAttribute_ptr
- _FindCORBAAttribute(const char* theTypeOfAttribute);
-
Handle(TDF_Attribute)
_AddAttribute(const char* theTypeOfAttribute);
std::string _name;
TDF_Label _lab;
- typedef std::string TAttributeID;
- typedef SALOMEDS_GenericAttribute_i* TAttrHolder;
- typedef std::map<TAttributeID,TAttrHolder> TAttrMap;
- TAttrMap myAttrMap;
-
SALOMEDS_SObject_i(SALOMEDS_Study_i* theStudy,
const TDF_Label& theLabel);