Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

IRObject.cc File Reference

#include "IRObject.h"
#include "Repository.h"
#include "PersistNode.h"
#include <algorithm>
#include <stdio.h>

Include dependency graph for IRObject.cc:

Go to the source code of this file.

Namespaces

namespace  Omniifr

Functions

void getPoaAndOid (IRObject_impl *servant, PortableServer::POA_var &poa, CORBA::String_var &poaName, PortableServer::ObjectId_var &oid, CORBA::String_var &oidStr)
 Helper method.


Function Documentation

void getPoaAndOid IRObject_impl *  servant,
PortableServer::POA_var &  poa,
CORBA::String_var &  poaName,
PortableServer::ObjectId_var &  oid,
CORBA::String_var &  oidStr
 

Helper method.

Just gets the object's POA, POA name, OID & Stringified OID.

Definition at line 46 of file IRObject.cc.

References IFELSE_OMNIORB4.

Referenced by Omniifr::IRObject_impl::deactivateObject(), and Omniifr::IRObject_impl::outputOid().

00053 {
00054   using namespace PortableServer;
00055   poa=servant->_default_POA();
00056   poaName=poa->the_name();
00057   try
00058   {
00059     oid=poa->servant_to_id(servant);
00060   }
00061   catch(POA::ServantNotActive& ex)
00062   {
00063     cerr<<"Can't get ObjectID.\nPOA '"<<poaName.in()
00064         <<"' says it is not active."<<endl;
00065   }
00066   catch(POA::WrongPolicy& ex)
00067   {
00068     cerr<<"Can't get ObjectID.\nPOA '"<<poaName.in()
00069         <<"' has wrong policy for servant_to_id()."<<endl;
00070     ::exit(1); // Programming error - so quit.
00071   }
00072 
00073   try
00074   {
00075     oidStr=ObjectId_to_string(oid.in());
00076   }
00077   catch(CORBA::BAD_PARAM& ex)
00078   {
00079     cerr<<"Can't convert ObjectID to string.\n"
00080       "BAD_PARAM" IFELSE_OMNIORB4(": "<<ex.NP_minorString(),) <<endl;
00081   }
00082 }


Generated on Fri Mar 4 13:03:40 2005 for OmniIFR by  doxygen 1.4.1