Classes | |
| class | AliasDef_impl |
| class | ArrayDef_impl |
| class | AttributeDef_impl |
| class | ConstantDef_impl |
| class | Contained_impl |
| class | Container_impl |
| class | Creche |
| Used to hold IRObject_impl objects while they are being constructed. More... | |
| class | Daemon |
| Interface class that contains various methods for running omniIFR as a background task. More... | |
| class | DaemonImpl |
| Utility class that contains various methods for running omniIFR as a Unix daemon. More... | |
| class | Win |
| Utility class, contains functions that Windows should have, but doesn't. More... | |
| class | RegistryKey |
| Opens a windows registry key, and closed it upon destruction. More... | |
| class | Service |
| Singleton class that contains various methods for running a Windows service. More... | |
| class | Dependency1 |
| Dependency for single references to IRObject. More... | |
| class | Dependency2 |
| Dependency for sequence<IRObject>. More... | |
| class | Dependency3 |
| Dependency for sequence<xxxDescription>, where xxxDescription is a struct with the following members: Identifier name IRObject type_def. More... | |
| class | EnumDef_impl |
| class | ExceptionDef_impl |
| class | FixedDef_impl |
| class | IdentifierUtil |
| Utility class containing useful methods for manipulating IDL identifiers. More... | |
| class | IDLType_impl |
| class | InterfaceDef_impl |
| class | DependencyBase |
| Base class for Dependency objects. More... | |
| class | IRObject_impl |
| class | ModuleDef_impl |
| class | NativeDef_impl |
| Not implemented. More... | |
| class | OperationDef_impl |
| class | Persist |
| Responsible for reading & writing the persistancy database. More... | |
| class | PersistNode |
| class | PrimitiveDef_impl |
| class | Repository_impl |
| class | SequenceDef_impl |
| class | StringDef_impl |
| class | StructDef_impl |
| class | TypedefDef_impl |
| class | UnionDef_impl |
| class | WstringDef_impl |
Functions | |
| void | shutdown0 (void) |
| Param to atexit(). | |
| void | shutdown2 (int s, void *) |
| Param to on_exit(). | |
| IRObject_impl * | referenceToServant (Object_ptr obj) |
| Helper method. | |
| void | getPoaAndOid (IRObject_impl *servant, PortableServer::POA_var &poa, CORBA::String_var &poaName, PortableServer::ObjectId_var &oid, CORBA::String_var &oidStr) |
| Helper method. | |
| template<class T> | |
| T::_ptr_type | lookupTc (Repository_impl &repository, TypeCode_ptr tc, const char *&id, const char *&name) |
| Helper method used by get_canonical_typecode(). | |
| template<class T> | |
| T::_ptr_type | string_to_ (const char *oidStr) |
| Converts a string to a narrowed reference. | |
Variables | |
| DaemonImpl | daemon |
| Singleton - only at file scope. | |
| static Service | service |
| Singleton - only at file scope. | |
|
||||||||||||||||||||||||
|
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 }
|
|
||||||||||||||||||||||||
|
Helper method used by get_canonical_typecode(). Extracts a narrowed IRObject from the repository, or returns a nil reference. Side effect: sets id & name from the tc. Definition at line 47 of file Repository.cc. References DB. 00053 {
00054 // Note the non-standard memory management of these functions.
00055 // id() & name() both return "const char*". The TC retains ownership of the
00056 // strings.
00057 id =tc->id();
00058 name =tc->name();
00059
00060 // Attempt to find 'id' in the repository.
00061 Contained_var contained =repository.lookup_id(id);
00062 typename T::_var_type result =T::_nil();
00063 if(!CORBA::is_nil(contained))
00064 {
00065 result=T::_narrow(contained.in());
00066 if(CORBA::is_nil(result))
00067 {
00068 DB(1,id<<" is in the repository, but TCKind does not match.") //??
00069 }
00070 }
00071 return result._retn();
00072 }
|
|
|
Helper method. Converts an object reference into a IRObject_impl pointer. If the conversion succeeds, then the result's servant ref count has been incremented (_add_ref() has been called). It is the caller's responsibility to call _remove_ref() once they are finished with the servant. Deals with all CORBA exceptions that may arise. Definition at line 38 of file Dependency.h. References DB, and IFELSE_OMNIORB4. Referenced by Omniifr::Dependency3< StructMemberSeq >::set(), Omniifr::Dependency2< InterfaceDefSeq >::set(), and Omniifr::Dependency1< CORBA::IDLType >::set(). 00039 {
00040 IRObject_impl* result =NULL;
00041 PortableServer::Servant servant =NULL;
00042
00043 try
00044 {
00045 servant=Repository_impl::inst()._poa->reference_to_servant(obj);
00046 // servant's reference count has been incremented for us.
00047 result=dynamic_cast<IRObject_impl*>(servant);
00048 }
00049 catch(PortableServer::POA::ObjectNotActive& ex)
00050 {
00051 // _poa does not contain irobject.
00052 servant=NULL;
00053 // ?? Temporary diagnostic - help to debug reincarnation:
00054 // ?? remove this when reincarnation works.
00055 DB(1,"?? Reference to object that doesn't exist yet. ??")
00056 }
00057 catch(PortableServer::POA::WrongAdapter& ex)
00058 {
00059 cerr<<"POA has wrong adapter for reference_to_servant()."<<endl;
00060 exit(1); // Programming error - so quit.
00061 }
00062 catch(PortableServer::POA::WrongPolicy& ex)
00063 {
00064 cerr<<"POA has wrong policy for reference_to_servant()."<<endl;
00065 exit(1); // Programming error - so quit.
00066 }
00067 catch(Exception& ex)
00068 {
00069 DB(1,"Failed to get reference_to_servant"
00070 IFELSE_OMNIORB4(" ("<<ex._name()<<")",)) // but press on...
00071 }
00072
00073 if(servant && !result)
00074 servant->_remove_ref();// Balances the implicit _add_ref in ref'_to_servant()
00075 return result;
00076 }
|
|
|
Param to atexit().
Definition at line 114 of file daemon_unix.cc. References daemon, and Omniifr::DaemonImpl::shutdown(). Referenced by Omniifr::Service::daemonize(), and Omniifr::DaemonImpl::daemonize(). |
|
||||||||||||
|
Param to on_exit().
Definition at line 115 of file daemon_unix.cc. References daemon, and Omniifr::DaemonImpl::shutdown(). Referenced by Omniifr::DaemonImpl::daemonize(). |
|
||||||||||
|
Converts a string to a narrowed reference.
Definition at line 44 of file string_to.h. 00045 {
00046 CORBA::Object_var obj =Repository_impl::inst()._orb->string_to_object(oidStr);
00047
00048 if(CORBA::is_nil(obj.in()))
00049 throw CORBA::BAD_PARAM();
00050
00051 #ifdef HAVE_OMNIORB4
00052 typename T::_var_type result =T::_unchecked_narrow(obj);
00053 #else
00054 typename T::_var_type result =T::_narrow(obj);
00055 #endif
00056
00057 if(CORBA::is_nil(result.in()))
00058 throw CORBA::BAD_PARAM();
00059
00060 return result._retn();
00061 }
|
|
|
Singleton - only at file scope. Although we initialize the value to NULL, we don't trust that the runtime will actually initialise it. Definition at line 94 of file daemon_unix.cc. Referenced by Omniifr::Daemon::Daemon(), Omniifr::Daemon::daemonize(), Omniifr::Daemon::foreground(), Omniifr::DaemonImpl::log(), main(), Omniifr::Daemon::pidfile(), Omniifr::Daemon::runningOk(), shutdown0(), shutdown2(), Omniifr::Daemon::tracefile(), and Omniifr::Daemon::~Daemon(). |
|
|
Singleton - only at file scope.
Definition at line 166 of file daemon_windows.cc. Referenced by Omniifr::Service::ctrlHandler(), Omniifr::Service::install(), Omniifr::Service::log(), and Omniifr::Service::uninstall(). |
1.4.1