summaryrefslogtreecommitdiff
path: root/TAO/utils/NamingViewer/NamingObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/utils/NamingViewer/NamingObject.h')
-rw-r--r--TAO/utils/NamingViewer/NamingObject.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/TAO/utils/NamingViewer/NamingObject.h b/TAO/utils/NamingViewer/NamingObject.h
new file mode 100644
index 00000000000..5dd5a1fed27
--- /dev/null
+++ b/TAO/utils/NamingViewer/NamingObject.h
@@ -0,0 +1,42 @@
+// $Id$
+// NamingObject.h: interface for the CNamingObject class.
+
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_NAMINGOBJECT_H__1F34ADC4_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_)
+#define AFX_NAMINGOBJECT_H__1F34ADC4_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "orbsvcs/CosNamingC.h"
+
+class CNamingObject
+{
+public:
+ CNamingObject (CosNaming::Name& Name,
+ CORBA::Object_ptr pObject,
+ bool Context);
+ ~CNamingObject (void);
+
+ CosNaming::NamingContext_ptr NamingContext (void);
+
+ // Returns a duplicated naming context ptr if this is a context or
+ // nil if its not.
+ CORBA::Object_ptr Object (void);
+
+ // returns a non duplicated object reference
+ CosNaming::Name& Name (void);
+ // returns the name of the object
+
+ bool IsContext (void) { return m_Context; }
+
+ // Returns true if this is a context
+private:
+ CORBA::Object_var m_Object;
+ CosNaming::Name m_Name;
+ bool m_Context;
+};
+
+#endif // !defined(AFX_NAMINGOBJECT_H__1F34ADC4_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_)