Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Repository.cc File Reference

#include "Repository.h"
#include "Contained.h"
#include "TypedefDef.h"
#include "PrimitiveDef.h"
#include "StringDef.h"
#include "WstringDef.h"
#include "SequenceDef.h"
#include "ArrayDef.h"
#include "FixedDef.h"
#include "Persist.h"
#include "PersistNode.h"
#include "Creche.h"
#include <string.h>

Include dependency graph for Repository.cc:

Go to the source code of this file.

Namespaces

namespace  Omniifr

Functions

template<class T>
T::_ptr_type lookupTc (Repository_impl &repository, TypeCode_ptr tc, const char *&id, const char *&name)
 Helper method used by get_canonical_typecode().


Function Documentation

template<class T>
T::_ptr_type lookupTc Repository_impl &  repository,
TypeCode_ptr  tc,
const char *&  id,
const char *&  name
 

Helper method used by get_canonical_typecode().

Extracts a narrowed IRObject from the repository, or returns a nil reference. Side effect: sets id & name from the tc.

Definition at line 47 of file Repository.cc.

References DB.

00053 {
00054   // Note the non-standard memory management of these functions.
00055   // id() & name() both return "const char*". The TC retains ownership of the
00056   // strings.
00057   id   =tc->id();
00058   name =tc->name();
00059 
00060   // Attempt to find 'id' in the repository.
00061   Contained_var contained =repository.lookup_id(id);
00062   typename T::_var_type result =T::_nil();
00063   if(!CORBA::is_nil(contained))
00064   {
00065     result=T::_narrow(contained.in());
00066     if(CORBA::is_nil(result))
00067     {
00068       DB(1,id<<" is in the repository, but TCKind does not match.") //??
00069     }
00070   }
00071   return result._retn();
00072 }


Generated on Fri Mar 4 13:03:46 2005 for OmniIFR by  doxygen 1.4.1