From 54191a377b67a851dc03c754a23cb8aaca6b18b2 Mon Sep 17 00:00:00 2001 From: zhangw Date: Mon, 15 Jan 2007 23:26:37 +0000 Subject: Creating a branch of ACE+TAO+CIAO for OCI RT 9734 --- TAO/utils/NamingViewer/NamingObject.cpp | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 TAO/utils/NamingViewer/NamingObject.cpp (limited to 'TAO/utils/NamingViewer/NamingObject.cpp') diff --git a/TAO/utils/NamingViewer/NamingObject.cpp b/TAO/utils/NamingViewer/NamingObject.cpp new file mode 100644 index 00000000000..3d47d9ca2c6 --- /dev/null +++ b/TAO/utils/NamingViewer/NamingObject.cpp @@ -0,0 +1,46 @@ +// $Id$ + +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "NamingViewer.h" +#include "NamingObject.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[]=__FILE__; +#define new DEBUG_NEW +#endif + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CNamingObject::CNamingObject(CosNaming::Name &Name, + CORBA::Object_ptr pObject, + bool Context) + : m_Name (Name), + m_Object (CORBA::Object::_duplicate (pObject)), + m_Context (Context) +{ + +} + +CNamingObject::~CNamingObject (void) +{ +} + +CosNaming::NamingContext_ptr CNamingObject::NamingContext (void) +{ + return CosNaming::NamingContext::_narrow (m_Object); +} + +CORBA::Object_ptr CNamingObject::Object (void) +{ + return m_Object; +} + +CosNaming::Name& CNamingObject::Name (void) +{ + return m_Name; +} -- cgit v1.2.1