// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
// File : SALOME_GenericObj_i.cc
#include "SALOME_GenericObj_i.hh"
#include "utilities.h"
+#ifdef _DEBUG_
+static int MYDEBUG = 0;
+#else
+static int MYDEBUG = 0;
+#endif
+
using namespace SALOME;
+using namespace std;
GenericObj_i::GenericObj_i(PortableServer::POA_ptr thePOA): myRefCounter(1){
- INFOS("GenericObj_i::GenericObj_i() - this = "<<this<<
- "; CORBA::is_nil(thePOA) = "<<CORBA::is_nil(thePOA));
+ if(MYDEBUG)
+ MESSAGE("GenericObj_i::GenericObj_i() - this = "<<this<<
+ "; CORBA::is_nil(thePOA) = "<<CORBA::is_nil(thePOA));
if(CORBA::is_nil(thePOA))
- myPOA = PortableServer::RefCountServantBase::_default_POA();
+#ifndef WIN32
+ myPOA = PortableServer::ServantBase::_default_POA();
+#else
+ myPOA = ServantBase::_default_POA();
+#endif
else
myPOA = PortableServer::POA::_duplicate(thePOA);
}
PortableServer::POA_ptr GenericObj_i::_default_POA(){
- //return PortableServer::RefCountServantBase::_default_POA();
return PortableServer::POA::_duplicate(myPOA);
}
void GenericObj_i::Register(){
- INFOS("GenericObj_i::Register "<<this<<"; myRefCounter = "<<myRefCounter)
+ if(MYDEBUG)
+ MESSAGE("GenericObj_i::Register "<<this<<"; myRefCounter = "<<myRefCounter)
++myRefCounter;
}
void GenericObj_i::Destroy(){
- INFOS("GenericObj_i::Destroy "<<this<<"; myRefCounter = "<<myRefCounter)
+ if(MYDEBUG)
+ MESSAGE("GenericObj_i::Destroy "<<this<<"; myRefCounter = "<<myRefCounter)
if(--myRefCounter <= 0){
PortableServer::ObjectId_var anObjectId = myPOA->servant_to_id(this);
myPOA->deactivate_object(anObjectId.in());