From 098294d3ff4a69abb8fb7d023db325297f7e43af Mon Sep 17 00:00:00 2001 From: levine Date: Tue, 24 Mar 1998 13:28:35 +0000 Subject: #include the .i file in the .h/.cpp file instead of corba.h --- TAO/tao/NVList.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'TAO/tao/NVList.cpp') diff --git a/TAO/tao/NVList.cpp b/TAO/tao/NVList.cpp index 580d828cce5..a6808686f8a 100644 --- a/TAO/tao/NVList.cpp +++ b/TAO/tao/NVList.cpp @@ -1,9 +1,13 @@ -// This may look like C, but it's really -*- C++ -*- +// $Id$ // Implementation of Named Value List and NamedValue classes #include "tao/corba.h" +#if !defined (__ACE_INLINE__) +# include "tao/NVList.i" +#endif /* ! __ACE_INLINE__ */ + CORBA::ULong CORBA_NamedValue::AddRef (void) { @@ -273,3 +277,19 @@ CORBA_NVList::add_element (CORBA::Flags flags, CORBA::Environment &env) return 1; // success } + +// This was inline, but didn't survive the removal of .i #includes +// from corba.h. env.exception wasn't known. Maybe the circular +// #includes between corba.h and ORB.h need to be removed. +CORBA::NamedValue_ptr +CORBA_NVList::item (CORBA::ULong n, CORBA::Environment &env) +{ + env.clear (); + if (n >= this->max_) // 0 based indexing + { + env.exception (new CORBA::TypeCode::Bounds ()); + return 0; + } + else + return &this->values_ [n]; +} -- cgit v1.2.1