| 1 | #ifndef ORB_DEV_H
|
|---|
| 2 | #define ORB_DEV_H
|
|---|
| 3 |
|
|---|
| 4 | #include "ossieparser.h"
|
|---|
| 5 |
|
|---|
| 6 | #include "tao\corba.h"
|
|---|
| 7 | #include "orbsvcs\CosNamingC.h"
|
|---|
| 8 | #include "tao\PortableServer\PortableServer.h"
|
|---|
| 9 |
|
|---|
| 10 | #include "ace\os.h"
|
|---|
| 11 |
|
|---|
| 12 | #include <string>
|
|---|
| 13 |
|
|---|
| 14 | #include <sstream>
|
|---|
| 15 |
|
|---|
| 16 | using namespace std;
|
|---|
| 17 |
|
|---|
| 18 | #define CORBAOBJ CORBA::Object_var
|
|---|
| 19 |
|
|---|
| 20 | #define CORBAPTR CORBA::Object_ptr
|
|---|
| 21 |
|
|---|
| 22 | class OSSIEPARSER_API ORB_WRAP
|
|---|
| 23 | {
|
|---|
| 24 | private:
|
|---|
| 25 | CosNaming::NamingContext_var nc;
|
|---|
| 26 | PortableServer::POA_var root_poa;
|
|---|
| 27 | PortableServer::POAManager_var mgr;
|
|---|
| 28 |
|
|---|
| 29 | static bool orbIsWorking;
|
|---|
| 30 |
|
|---|
| 31 | void init();
|
|---|
| 32 |
|
|---|
| 33 | public:
|
|---|
| 34 | static CORBA::ORB_var orb;
|
|---|
| 35 | static int vars;
|
|---|
| 36 |
|
|---|
| 37 | ORB_WRAP();
|
|---|
| 38 |
|
|---|
| 39 | ORB_WRAP( int, char** );
|
|---|
| 40 |
|
|---|
| 41 | // ~ORB_WRAP();
|
|---|
| 42 |
|
|---|
| 43 | CORBAOBJ lookup( const char* _name );
|
|---|
| 44 |
|
|---|
| 45 | void bindObj( CORBAOBJ & _obj, const char* _name );
|
|---|
| 46 |
|
|---|
| 47 | PortableServer::POA_var getPOA() const;
|
|---|
| 48 |
|
|---|
| 49 | CosNaming::NamingContext_var getNamingContext() const;
|
|---|
| 50 |
|
|---|
| 51 | //static CORBA::Any anyType( const char* _type, const char* _value );
|
|---|
| 52 | static void anyType( const char* _type, const char* _value, CORBA::Any & );
|
|---|
| 53 |
|
|---|
| 54 | static bool isValidType( CORBA::Any _val1, CORBA::Any _val2 );
|
|---|
| 55 |
|
|---|
| 56 | static void getCosName( CosNaming::Name& cosName, const char* _name );
|
|---|
| 57 |
|
|---|
| 58 | static bool isWorking() { return ORB_WRAP::orbIsWorking; }
|
|---|
| 59 |
|
|---|
| 60 | static void startWork() { ORB_WRAP::orbIsWorking = true; }
|
|---|
| 61 |
|
|---|
| 62 | static void stopWork() { ORB_WRAP::orbIsWorking = false; }
|
|---|
| 63 |
|
|---|
| 64 | // static int getOrbArgs() { return orb_args; }
|
|---|
| 65 |
|
|---|
| 66 | // static char* getOrbParms() { return orb_parms; }
|
|---|
| 67 | };
|
|---|
| 68 |
|
|---|
| 69 | #endif
|
|---|