Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / utils / NamingViewer / NamingObject.h
blobdec96a57aa2ff11e18d57ba62ac0823dbf5bf6b0
1 // NamingObject.h: interface for the CNamingObject class.
3 //////////////////////////////////////////////////////////////////////
5 #if !defined(AFX_NAMINGOBJECT_H__1F34ADC4_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_)
6 #define AFX_NAMINGOBJECT_H__1F34ADC4_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_
8 #if _MSC_VER > 1000
9 #pragma once
10 #endif // _MSC_VER > 1000
12 #include "orbsvcs/CosNamingC.h"
14 class CNamingObject
16 public:
17 CNamingObject (CosNaming::Name& Name,
18 CORBA::Object_ptr pObject,
19 bool Context);
20 ~CNamingObject (void);
22 CosNaming::NamingContext_ptr NamingContext (void);
24 // Returns a duplicated naming context ptr if this is a context or
25 // nil if its not.
26 CORBA::Object_ptr Object (void);
28 // returns a non duplicated object reference
29 CosNaming::Name& Name (void);
30 // returns the name of the object
32 bool IsContext (void) { return m_Context; }
34 // Returns true if this is a context
35 private:
36 CORBA::Object_var m_Object;
37 CosNaming::Name m_Name;
38 bool m_Context;
41 #endif // !defined(AFX_NAMINGOBJECT_H__1F34ADC4_B0D8_11D3_BF27_00C0F03C565A__INCLUDED_)