public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Namespace bug?
@ 1999-02-17  1:38 Mike Stump
  1999-02-28 22:53 ` Mike Stump
  0 siblings, 1 reply; 14+ messages in thread
From: Mike Stump @ 1999-02-17  1:38 UTC (permalink / raw)
  To: fischer, martin; +Cc: egcs

> Date: Wed, 17 Feb 1999 10:21:22 +0100
> From: =?iso-8859-1?Q?Hans=2DJ=F6rg?= Fischer <fischer@zkm.de>

> I am sorry, I should habe read them first. However, the files you
> name form part of the MICO distribution which is really
> complex. Therefore, I decided not to include them in my eMail.

Complexity isn't a good reason to not submit a bug report.  g++ -E
will include all necessary bits (if the bug can be show by one
translation unit).

> Is it correct therefore that I cannot partition a class
> implementation into different source files?

No.  You can do that all you want, what you are required to do, is
define all virtual members.

> Is this according to standard C++ specs?

Yes.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Namespace bug?
  1999-02-17  1:38 Namespace bug? Mike Stump
@ 1999-02-28 22:53 ` Mike Stump
  0 siblings, 0 replies; 14+ messages in thread
From: Mike Stump @ 1999-02-28 22:53 UTC (permalink / raw)
  To: fischer, martin; +Cc: egcs

> Date: Wed, 17 Feb 1999 10:21:22 +0100
> From: =?iso-8859-1?Q?Hans=2DJ=F6rg?= Fischer <fischer@zkm.de>

> I am sorry, I should habe read them first. However, the files you
> name form part of the MICO distribution which is really
> complex. Therefore, I decided not to include them in my eMail.

Complexity isn't a good reason to not submit a bug report.  g++ -E
will include all necessary bits (if the bug can be show by one
translation unit).

> Is it correct therefore that I cannot partition a class
> implementation into different source files?

No.  You can do that all you want, what you are required to do, is
define all virtual members.

> Is this according to standard C++ specs?

Yes.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Namespace bug?
  1999-02-08 11:15   ` Hans-Jörg Fischer
       [not found]     ` < 36BF37F8.497DEF55@zkm.de >
@ 1999-02-28 22:53     ` Hans-Jörg Fischer
  1 sibling, 0 replies; 14+ messages in thread
From: Hans-Jörg Fischer @ 1999-02-28 22:53 UTC (permalink / raw)
  To: egcs-common

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

Alexandre Oliva wrote:

> > Obviously, the compiler gets confused with the base class and assumes it
> > in the wrong namespace.
> 
> Unless you post some actual code, there's no way this is obvious.

Here you go...(the files base on the MICO distribution)

Sincerely

Joerg Fischer
filesystemdatasource_impl.h
filesystemdatasource.h
filesystemdatasource_impl.cc
filesystemdatasource.cc
poa.h


[-- Attachment #2: filesystemdatasource.cc --]
[-- Type: text/x-c++, Size: 37427 bytes --]

/*
 *  MICO --- a free CORBA implementation
 *  Copyright (C) 1997-98 Kay Roemer & Arno Puder
 *
 *  This file was automatically generated. DO NOT EDIT!
 */

#include "filesystemdatasource.h"

//--------------------------------------------------------
//  Implementation of stubs
//--------------------------------------------------------

// Stub interface FileSystemDataSource
ODB::FileSystemDataSource::~FileSystemDataSource()
{
}

ODB::FileSystemDataSource_ptr ODB::FileSystemDataSource::_duplicate( FileSystemDataSource_ptr _obj )
{
  if( !CORBA::is_nil( _obj ) )
    _obj->_ref();
  return _obj;
}

void *ODB::FileSystemDataSource::_narrow_helper( const char *_repoid )
{
  if( strcmp( _repoid, "IDL:ODB/FileSystemDataSource:1.0" ) == 0 )
    return (void *)this;
  {
    void *_p;
    if( (_p = DataSource::_narrow_helper( _repoid )))
      return _p;
  }
  return NULL;
}

bool ODB::FileSystemDataSource::_narrow_helper2( CORBA::Object_ptr _obj )
{
  if( strcmp( _obj->_repoid(), "IDL:ODB/FileSystemDataSource:1.0" ) == 0) {
    return true;
  }
  for( vector<CORBA::Narrow_proto>::size_type _i = 0;
       _narrow_helpers && _i < _narrow_helpers->size(); _i++ ) {
    bool _res = (*(*_narrow_helpers)[ _i ])( _obj );
    if( _res )
      return true;
  }
  return false;
}

ODB::FileSystemDataSource_ptr ODB::FileSystemDataSource::_narrow( CORBA::Object_ptr _obj )
{
  ODB::FileSystemDataSource_ptr _o;
  if( !CORBA::is_nil( _obj ) ) {
    void *_p;
    if( (_p = _obj->_narrow_helper( "IDL:ODB/FileSystemDataSource:1.0" )))
      return _duplicate( (ODB::FileSystemDataSource_ptr) _p );
    if( _narrow_helper2( _obj ) ) {
      _o = new ODB::FileSystemDataSource_stub;
      _o->MICO_SCOPE(CORBA,Object::operator=)( *_obj );
      return _o;
    }
  }
  return _nil();
}

ODB::FileSystemDataSource_ptr ODB::FileSystemDataSource::_nil()
{
  return NULL;
}

ODB::FileSystemDataSource_stub::~FileSystemDataSource_stub()
{
}

#ifndef MICO_CONF_NO_POA

ODB::FileSystemDataSource_stub_clp::FileSystemDataSource_stub_clp (PortableServer::POA_ptr poa, CORBA::Object_ptr obj)
  : PortableServer::StubBase (poa), CORBA::Object (*obj),
  ::ODB::DataSource_stub_clp (poa, obj)
{
}

ODB::FileSystemDataSource_stub_clp::~FileSystemDataSource_stub_clp ()
{
}

#endif // MICO_CONF_NO_POA

struct _global_init_ODB_FileSystemDataSource {
  _global_init_ODB_FileSystemDataSource()
  {
    if( ::ODB::DataSource::_narrow_helpers == NULL )
      ::ODB::DataSource::_narrow_helpers = new vector<CORBA::Narrow_proto>;
    ::ODB::DataSource::_narrow_helpers->push_back( ODB::FileSystemDataSource::_narrow_helper2 );
  }
} __global_init_ODB_FileSystemDataSource;

#ifdef HAVE_NAMESPACE
namespace ODB { vector<CORBA::Narrow_proto> * FileSystemDataSource::_narrow_helpers; };
#else
vector<CORBA::Narrow_proto> * ODB::FileSystemDataSource::_narrow_helpers;
#endif

class _Marshaller_ODB_FileSystemDataSource : public CORBA::StaticTypeInfo {
    typedef ODB::FileSystemDataSource_ptr _T;
  public:
    StaticValueType create () const;
    void assign (StaticValueType dst, const StaticValueType src) const;
    void free (StaticValueType) const;
    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
    void marshal (CORBA::DataEncoder &, StaticValueType) const;
};


CORBA::StaticValueType _Marshaller_ODB_FileSystemDataSource::create() const
{
  return (StaticValueType) new _T( 0 );
}

void _Marshaller_ODB_FileSystemDataSource::assign( StaticValueType d, const StaticValueType s ) const
{
  *(_T*) d = ::ODB::FileSystemDataSource::_duplicate( *(_T*) s );
}

void _Marshaller_ODB_FileSystemDataSource::free( StaticValueType v ) const
{
  CORBA::release( *(_T *) v );
  delete (_T*) v;
}

CORBA::Boolean _Marshaller_ODB_FileSystemDataSource::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
{
  CORBA::Object_ptr obj;
  if( !CORBA::_stc_Object->demarshal( dc, &obj ) )
    return FALSE;
  *(_T *) v = ::ODB::FileSystemDataSource::_narrow( obj );
  CORBA::release( obj );
  return TRUE;
}

void _Marshaller_ODB_FileSystemDataSource::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
{
  CORBA::Object_ptr obj = *(_T *) v;
  CORBA::_stc_Object->marshal( ec, &obj );
}

CORBA::StaticTypeInfo *_marshaller_ODB_FileSystemDataSource;


// Stub interface AbstractFile
ODB::FS::AbstractFile::~AbstractFile()
{
}

ODB::FS::AbstractFile_ptr ODB::FS::AbstractFile::_duplicate( AbstractFile_ptr _obj )
{
  if( !CORBA::is_nil( _obj ) )
    _obj->_ref();
  return _obj;
}

void *ODB::FS::AbstractFile::_narrow_helper( const char *_repoid )
{
  if( strcmp( _repoid, "IDL:ODB/FS/AbstractFile:1.0" ) == 0 )
    return (void *)this;
  return NULL;
}

bool ODB::FS::AbstractFile::_narrow_helper2( CORBA::Object_ptr _obj )
{
  if( strcmp( _obj->_repoid(), "IDL:ODB/FS/AbstractFile:1.0" ) == 0) {
    return true;
  }
  for( vector<CORBA::Narrow_proto>::size_type _i = 0;
       _narrow_helpers && _i < _narrow_helpers->size(); _i++ ) {
    bool _res = (*(*_narrow_helpers)[ _i ])( _obj );
    if( _res )
      return true;
  }
  return false;
}

ODB::FS::AbstractFile_ptr ODB::FS::AbstractFile::_narrow( CORBA::Object_ptr _obj )
{
  ODB::FS::AbstractFile_ptr _o;
  if( !CORBA::is_nil( _obj ) ) {
    void *_p;
    if( (_p = _obj->_narrow_helper( "IDL:ODB/FS/AbstractFile:1.0" )))
      return _duplicate( (ODB::FS::AbstractFile_ptr) _p );
    if( _narrow_helper2( _obj ) ) {
      _o = new ODB::FS::AbstractFile_stub;
      _o->MICO_SCOPE(CORBA,Object::operator=)( *_obj );
      return _o;
    }
  }
  return _nil();
}

ODB::FS::AbstractFile_ptr ODB::FS::AbstractFile::_nil()
{
  return NULL;
}

ODB::FS::AbstractFile_stub::~AbstractFile_stub()
{
}

#ifndef MICO_CONF_NO_POA

ODB::FS::AbstractFile_stub_clp::AbstractFile_stub_clp (PortableServer::POA_ptr poa, CORBA::Object_ptr obj)
  : PortableServer::StubBase (poa), CORBA::Object (*obj)
{
}

ODB::FS::AbstractFile_stub_clp::~AbstractFile_stub_clp ()
{
}

#endif // MICO_CONF_NO_POA

char* ODB::FS::AbstractFile_stub::name()
{
  char* _res;
  CORBA::StaticAny __res( CORBA::_stc_string, &_res );

  CORBA::StaticRequest __req( this, "_get_name" );
  __req.set_result( &__res );

  __req.invoke();

  mico_sii_throw( &__req, 
    0);
  return _res;
}


#ifndef MICO_CONF_NO_POA

char*
ODB::FS::AbstractFile_stub_clp::name()
{
  PortableServer::Servant serv = _preinvoke ();
  if (serv) {
    POA_ODB::FS::AbstractFile * myserv = POA_ODB::FS::AbstractFile::_narrow (serv);
    if (myserv) {
      char* res;

      #ifdef HAVE_EXCEPTIONS
      try {
      #endif
        res = myserv->name();
      #ifdef HAVE_EXCEPTIONS
      }
      catch (...) {
        _postinvoke();
        throw;
      }
      #endif

      _postinvoke ();
      return res;
    }
    _postinvoke ();
  }

  return ODB::FS::AbstractFile_stub::name();
}

#endif // MICO_CONF_NO_POA

#ifdef HAVE_NAMESPACE
namespace ODB { namespace FS { vector<CORBA::Narrow_proto> * AbstractFile::_narrow_helpers; }; };
#else
vector<CORBA::Narrow_proto> * ODB::FS::AbstractFile::_narrow_helpers;
#endif

class _Marshaller_ODB_FS_AbstractFile : public CORBA::StaticTypeInfo {
    typedef ODB::FS::AbstractFile_ptr _T;
  public:
    StaticValueType create () const;
    void assign (StaticValueType dst, const StaticValueType src) const;
    void free (StaticValueType) const;
    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
    void marshal (CORBA::DataEncoder &, StaticValueType) const;
};


CORBA::StaticValueType _Marshaller_ODB_FS_AbstractFile::create() const
{
  return (StaticValueType) new _T( 0 );
}

void _Marshaller_ODB_FS_AbstractFile::assign( StaticValueType d, const StaticValueType s ) const
{
  *(_T*) d = ::ODB::FS::AbstractFile::_duplicate( *(_T*) s );
}

void _Marshaller_ODB_FS_AbstractFile::free( StaticValueType v ) const
{
  CORBA::release( *(_T *) v );
  delete (_T*) v;
}

CORBA::Boolean _Marshaller_ODB_FS_AbstractFile::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
{
  CORBA::Object_ptr obj;
  if( !CORBA::_stc_Object->demarshal( dc, &obj ) )
    return FALSE;
  *(_T *) v = ::ODB::FS::AbstractFile::_narrow( obj );
  CORBA::release( obj );
  return TRUE;
}

void _Marshaller_ODB_FS_AbstractFile::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
{
  CORBA::Object_ptr obj = *(_T *) v;
  CORBA::_stc_Object->marshal( ec, &obj );
}

CORBA::StaticTypeInfo *_marshaller_ODB_FS_AbstractFile;



// Stub interface Directory
ODB::FS::Directory::~Directory()
{
}

ODB::FS::Directory_ptr ODB::FS::Directory::_duplicate( Directory_ptr _obj )
{
  if( !CORBA::is_nil( _obj ) )
    _obj->_ref();
  return _obj;
}

void *ODB::FS::Directory::_narrow_helper( const char *_repoid )
{
  if( strcmp( _repoid, "IDL:ODB/FS/Directory:1.0" ) == 0 )
    return (void *)this;
  {
    void *_p;
    if( (_p = AbstractFile::_narrow_helper( _repoid )))
      return _p;
  }
  return NULL;
}

bool ODB::FS::Directory::_narrow_helper2( CORBA::Object_ptr _obj )
{
  if( strcmp( _obj->_repoid(), "IDL:ODB/FS/Directory:1.0" ) == 0) {
    return true;
  }
  for( vector<CORBA::Narrow_proto>::size_type _i = 0;
       _narrow_helpers && _i < _narrow_helpers->size(); _i++ ) {
    bool _res = (*(*_narrow_helpers)[ _i ])( _obj );
    if( _res )
      return true;
  }
  return false;
}

ODB::FS::Directory_ptr ODB::FS::Directory::_narrow( CORBA::Object_ptr _obj )
{
  ODB::FS::Directory_ptr _o;
  if( !CORBA::is_nil( _obj ) ) {
    void *_p;
    if( (_p = _obj->_narrow_helper( "IDL:ODB/FS/Directory:1.0" )))
      return _duplicate( (ODB::FS::Directory_ptr) _p );
    if( _narrow_helper2( _obj ) ) {
      _o = new ODB::FS::Directory_stub;
      _o->MICO_SCOPE(CORBA,Object::operator=)( *_obj );
      return _o;
    }
  }
  return _nil();
}

ODB::FS::Directory_ptr ODB::FS::Directory::_nil()
{
  return NULL;
}

ODB::FS::Directory_stub::~Directory_stub()
{
}

#ifndef MICO_CONF_NO_POA

ODB::FS::Directory_stub_clp::Directory_stub_clp (PortableServer::POA_ptr poa, CORBA::Object_ptr obj)
  : PortableServer::StubBase (poa), CORBA::Object (*obj),
  ::ODB::FS::AbstractFile_stub_clp (poa, obj)
{
}

ODB::FS::Directory_stub_clp::~Directory_stub_clp ()
{
}

#endif // MICO_CONF_NO_POA

ODB::FS::Directory::DirectoryContents* ODB::FS::Directory_stub::enum_files()
{
  CORBA::StaticAny __res( _marshaller__seq_ODB_FS_AbstractFile );

  CORBA::StaticRequest __req( this, "enum_files" );
  __req.set_result( &__res );

  __req.invoke();

  mico_sii_throw( &__req, 
    0);
  return (ODB::FS::Directory::DirectoryContents*) __res._retn();
}


#ifndef MICO_CONF_NO_POA

ODB::FS::Directory::DirectoryContents*
ODB::FS::Directory_stub_clp::enum_files()
{
  PortableServer::Servant serv = _preinvoke ();
  if (serv) {
    POA_ODB::FS::Directory * myserv = POA_ODB::FS::Directory::_narrow (serv);
    if (myserv) {
      ODB::FS::Directory::DirectoryContents* res;

      #ifdef HAVE_EXCEPTIONS
      try {
      #endif
        res = myserv->enum_files();
      #ifdef HAVE_EXCEPTIONS
      }
      catch (...) {
        _postinvoke();
        throw;
      }
      #endif

      _postinvoke ();
      return res;
    }
    _postinvoke ();
  }

  return ODB::FS::Directory_stub::enum_files();
}

#endif // MICO_CONF_NO_POA

struct _global_init_ODB_FS_Directory {
  _global_init_ODB_FS_Directory()
  {
    if( ::ODB::FS::AbstractFile::_narrow_helpers == NULL )
      ::ODB::FS::AbstractFile::_narrow_helpers = new vector<CORBA::Narrow_proto>;
    ::ODB::FS::AbstractFile::_narrow_helpers->push_back( ODB::FS::Directory::_narrow_helper2 );
  }
} __global_init_ODB_FS_Directory;

#ifdef HAVE_NAMESPACE
namespace ODB { namespace FS { vector<CORBA::Narrow_proto> * Directory::_narrow_helpers; }; };
#else
vector<CORBA::Narrow_proto> * ODB::FS::Directory::_narrow_helpers;
#endif

class _Marshaller_ODB_FS_Directory : public CORBA::StaticTypeInfo {
    typedef ODB::FS::Directory_ptr _T;
  public:
    StaticValueType create () const;
    void assign (StaticValueType dst, const StaticValueType src) const;
    void free (StaticValueType) const;
    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
    void marshal (CORBA::DataEncoder &, StaticValueType) const;
};


CORBA::StaticValueType _Marshaller_ODB_FS_Directory::create() const
{
  return (StaticValueType) new _T( 0 );
}

void _Marshaller_ODB_FS_Directory::assign( StaticValueType d, const StaticValueType s ) const
{
  *(_T*) d = ::ODB::FS::Directory::_duplicate( *(_T*) s );
}

void _Marshaller_ODB_FS_Directory::free( StaticValueType v ) const
{
  CORBA::release( *(_T *) v );
  delete (_T*) v;
}

CORBA::Boolean _Marshaller_ODB_FS_Directory::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
{
  CORBA::Object_ptr obj;
  if( !CORBA::_stc_Object->demarshal( dc, &obj ) )
    return FALSE;
  *(_T *) v = ::ODB::FS::Directory::_narrow( obj );
  CORBA::release( obj );
  return TRUE;
}

void _Marshaller_ODB_FS_Directory::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
{
  CORBA::Object_ptr obj = *(_T *) v;
  CORBA::_stc_Object->marshal( ec, &obj );
}

CORBA::StaticTypeInfo *_marshaller_ODB_FS_Directory;



// Stub interface File
ODB::FS::File::~File()
{
}

ODB::FS::File_ptr ODB::FS::File::_duplicate( File_ptr _obj )
{
  if( !CORBA::is_nil( _obj ) )
    _obj->_ref();
  return _obj;
}

void *ODB::FS::File::_narrow_helper( const char *_repoid )
{
  if( strcmp( _repoid, "IDL:ODB/FS/File:1.0" ) == 0 )
    return (void *)this;
  {
    void *_p;
    if( (_p = AbstractFile::_narrow_helper( _repoid )))
      return _p;
  }
  return NULL;
}

bool ODB::FS::File::_narrow_helper2( CORBA::Object_ptr _obj )
{
  if( strcmp( _obj->_repoid(), "IDL:ODB/FS/File:1.0" ) == 0) {
    return true;
  }
  for( vector<CORBA::Narrow_proto>::size_type _i = 0;
       _narrow_helpers && _i < _narrow_helpers->size(); _i++ ) {
    bool _res = (*(*_narrow_helpers)[ _i ])( _obj );
    if( _res )
      return true;
  }
  return false;
}

ODB::FS::File_ptr ODB::FS::File::_narrow( CORBA::Object_ptr _obj )
{
  ODB::FS::File_ptr _o;
  if( !CORBA::is_nil( _obj ) ) {
    void *_p;
    if( (_p = _obj->_narrow_helper( "IDL:ODB/FS/File:1.0" )))
      return _duplicate( (ODB::FS::File_ptr) _p );
    if( _narrow_helper2( _obj ) ) {
      _o = new ODB::FS::File_stub;
      _o->MICO_SCOPE(CORBA,Object::operator=)( *_obj );
      return _o;
    }
  }
  return _nil();
}

ODB::FS::File_ptr ODB::FS::File::_nil()
{
  return NULL;
}

ODB::FS::File_stub::~File_stub()
{
}

#ifndef MICO_CONF_NO_POA

ODB::FS::File_stub_clp::File_stub_clp (PortableServer::POA_ptr poa, CORBA::Object_ptr obj)
  : PortableServer::StubBase (poa), CORBA::Object (*obj),
  ::ODB::FS::AbstractFile_stub_clp (poa, obj)
{
}

ODB::FS::File_stub_clp::~File_stub_clp ()
{
}

#endif // MICO_CONF_NO_POA

ODB::FS::File::FileContents* ODB::FS::File_stub::contents()
{
  CORBA::StaticAny __res( CORBA::_stcseq_octet );

  CORBA::StaticRequest __req( this, "contents" );
  __req.set_result( &__res );

  __req.invoke();

  mico_sii_throw( &__req, 
    0);
  return (ODB::FS::File::FileContents*) __res._retn();
}


#ifndef MICO_CONF_NO_POA

ODB::FS::File::FileContents*
ODB::FS::File_stub_clp::contents()
{
  PortableServer::Servant serv = _preinvoke ();
  if (serv) {
    POA_ODB::FS::File * myserv = POA_ODB::FS::File::_narrow (serv);
    if (myserv) {
      ODB::FS::File::FileContents* res;

      #ifdef HAVE_EXCEPTIONS
      try {
      #endif
        res = myserv->contents();
      #ifdef HAVE_EXCEPTIONS
      }
      catch (...) {
        _postinvoke();
        throw;
      }
      #endif

      _postinvoke ();
      return res;
    }
    _postinvoke ();
  }

  return ODB::FS::File_stub::contents();
}

#endif // MICO_CONF_NO_POA

struct _global_init_ODB_FS_File {
  _global_init_ODB_FS_File()
  {
    if( ::ODB::FS::AbstractFile::_narrow_helpers == NULL )
      ::ODB::FS::AbstractFile::_narrow_helpers = new vector<CORBA::Narrow_proto>;
    ::ODB::FS::AbstractFile::_narrow_helpers->push_back( ODB::FS::File::_narrow_helper2 );
  }
} __global_init_ODB_FS_File;

#ifdef HAVE_NAMESPACE
namespace ODB { namespace FS { vector<CORBA::Narrow_proto> * File::_narrow_helpers; }; };
#else
vector<CORBA::Narrow_proto> * ODB::FS::File::_narrow_helpers;
#endif

class _Marshaller_ODB_FS_File : public CORBA::StaticTypeInfo {
    typedef ODB::FS::File_ptr _T;
  public:
    StaticValueType create () const;
    void assign (StaticValueType dst, const StaticValueType src) const;
    void free (StaticValueType) const;
    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
    void marshal (CORBA::DataEncoder &, StaticValueType) const;
};


CORBA::StaticValueType _Marshaller_ODB_FS_File::create() const
{
  return (StaticValueType) new _T( 0 );
}

void _Marshaller_ODB_FS_File::assign( StaticValueType d, const StaticValueType s ) const
{
  *(_T*) d = ::ODB::FS::File::_duplicate( *(_T*) s );
}

void _Marshaller_ODB_FS_File::free( StaticValueType v ) const
{
  CORBA::release( *(_T *) v );
  delete (_T*) v;
}

CORBA::Boolean _Marshaller_ODB_FS_File::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
{
  CORBA::Object_ptr obj;
  if( !CORBA::_stc_Object->demarshal( dc, &obj ) )
    return FALSE;
  *(_T *) v = ::ODB::FS::File::_narrow( obj );
  CORBA::release( obj );
  return TRUE;
}

void _Marshaller_ODB_FS_File::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
{
  CORBA::Object_ptr obj = *(_T *) v;
  CORBA::_stc_Object->marshal( ec, &obj );
}

CORBA::StaticTypeInfo *_marshaller_ODB_FS_File;


// Stub interface Impl
ODB::FS::Impl::~Impl()
{
}

ODB::FS::Impl_ptr ODB::FS::Impl::_duplicate( Impl_ptr _obj )
{
  if( !CORBA::is_nil( _obj ) )
    _obj->_ref();
  return _obj;
}

void *ODB::FS::Impl::_narrow_helper( const char *_repoid )
{
  if( strcmp( _repoid, "IDL:ODB/FS/Impl:1.0" ) == 0 )
    return (void *)this;
  {
    void *_p;
    if( (_p = File::_narrow_helper( _repoid )))
      return _p;
  }
  {
    void *_p;
    if( (_p = Directory::_narrow_helper( _repoid )))
      return _p;
  }
  return NULL;
}

bool ODB::FS::Impl::_narrow_helper2( CORBA::Object_ptr _obj )
{
  if( strcmp( _obj->_repoid(), "IDL:ODB/FS/Impl:1.0" ) == 0) {
    return true;
  }
  for( vector<CORBA::Narrow_proto>::size_type _i = 0;
       _narrow_helpers && _i < _narrow_helpers->size(); _i++ ) {
    bool _res = (*(*_narrow_helpers)[ _i ])( _obj );
    if( _res )
      return true;
  }
  return false;
}

ODB::FS::Impl_ptr ODB::FS::Impl::_narrow( CORBA::Object_ptr _obj )
{
  ODB::FS::Impl_ptr _o;
  if( !CORBA::is_nil( _obj ) ) {
    void *_p;
    if( (_p = _obj->_narrow_helper( "IDL:ODB/FS/Impl:1.0" )))
      return _duplicate( (ODB::FS::Impl_ptr) _p );
    if( _narrow_helper2( _obj ) ) {
      _o = new ODB::FS::Impl_stub;
      _o->MICO_SCOPE(CORBA,Object::operator=)( *_obj );
      return _o;
    }
  }
  return _nil();
}

ODB::FS::Impl_ptr ODB::FS::Impl::_nil()
{
  return NULL;
}

ODB::FS::Impl_stub::~Impl_stub()
{
}

#ifndef MICO_CONF_NO_POA

ODB::FS::Impl_stub_clp::Impl_stub_clp (PortableServer::POA_ptr poa, CORBA::Object_ptr obj)
  : PortableServer::StubBase (poa), CORBA::Object (*obj),
  ::ODB::FS::File_stub_clp (poa, obj),
  ::ODB::FS::Directory_stub_clp (poa, obj)
{
}

ODB::FS::Impl_stub_clp::~Impl_stub_clp ()
{
}

#endif // MICO_CONF_NO_POA

struct _global_init_ODB_FS_Impl {
  _global_init_ODB_FS_Impl()
  {
    if( ::ODB::FS::File::_narrow_helpers == NULL )
      ::ODB::FS::File::_narrow_helpers = new vector<CORBA::Narrow_proto>;
    ::ODB::FS::File::_narrow_helpers->push_back( ODB::FS::Impl::_narrow_helper2 );
    if( ::ODB::FS::Directory::_narrow_helpers == NULL )
      ::ODB::FS::Directory::_narrow_helpers = new vector<CORBA::Narrow_proto>;
    ::ODB::FS::Directory::_narrow_helpers->push_back( ODB::FS::Impl::_narrow_helper2 );
  }
} __global_init_ODB_FS_Impl;

#ifdef HAVE_NAMESPACE
namespace ODB { namespace FS { vector<CORBA::Narrow_proto> * Impl::_narrow_helpers; }; };
#else
vector<CORBA::Narrow_proto> * ODB::FS::Impl::_narrow_helpers;
#endif

class _Marshaller_ODB_FS_Impl : public CORBA::StaticTypeInfo {
    typedef ODB::FS::Impl_ptr _T;
  public:
    StaticValueType create () const;
    void assign (StaticValueType dst, const StaticValueType src) const;
    void free (StaticValueType) const;
    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
    void marshal (CORBA::DataEncoder &, StaticValueType) const;
};


CORBA::StaticValueType _Marshaller_ODB_FS_Impl::create() const
{
  return (StaticValueType) new _T( 0 );
}

void _Marshaller_ODB_FS_Impl::assign( StaticValueType d, const StaticValueType s ) const
{
  *(_T*) d = ::ODB::FS::Impl::_duplicate( *(_T*) s );
}

void _Marshaller_ODB_FS_Impl::free( StaticValueType v ) const
{
  CORBA::release( *(_T *) v );
  delete (_T*) v;
}

CORBA::Boolean _Marshaller_ODB_FS_Impl::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
{
  CORBA::Object_ptr obj;
  if( !CORBA::_stc_Object->demarshal( dc, &obj ) )
    return FALSE;
  *(_T *) v = ::ODB::FS::Impl::_narrow( obj );
  CORBA::release( obj );
  return TRUE;
}

void _Marshaller_ODB_FS_Impl::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
{
  CORBA::Object_ptr obj = *(_T *) v;
  CORBA::_stc_Object->marshal( ec, &obj );
}

CORBA::StaticTypeInfo *_marshaller_ODB_FS_Impl;

class _Marshaller__seq_ODB_FS_AbstractFile : public CORBA::StaticTypeInfo {
    typedef SequenceTmpl<ODB::FS::AbstractFile_var,MICO_TID_DEF> _T;
  public:
    StaticValueType create () const;
    void assign (StaticValueType dst, const StaticValueType src) const;
    void free (StaticValueType) const;
    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;
    void marshal (CORBA::DataEncoder &, StaticValueType) const;
};


CORBA::StaticValueType _Marshaller__seq_ODB_FS_AbstractFile::create() const
{
  return (StaticValueType) new _T;
}

void _Marshaller__seq_ODB_FS_AbstractFile::assign( StaticValueType d, const StaticValueType s ) const
{
  *(_T*) d = *(_T*) s;
}

void _Marshaller__seq_ODB_FS_AbstractFile::free( StaticValueType v ) const
{
  delete (_T*) v;
}

CORBA::Boolean _Marshaller__seq_ODB_FS_AbstractFile::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const
{
  CORBA::ULong len;
  if( !dc.seq_begin( len ) )
    return FALSE;
  ((_T *) v)->length( len );
  for( CORBA::ULong i = 0; i < len; i++ ) {
    if( !_marshaller_ODB_FS_AbstractFile->demarshal( dc, &(*(_T*)v)[i].inout() ) )
      return FALSE;
  }
  return dc.seq_end();
}

void _Marshaller__seq_ODB_FS_AbstractFile::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const
{
  CORBA::ULong len = ((_T *) v)->length();
  ec.seq_begin( len );
  for( CORBA::ULong i = 0; i < len; i++ )
    _marshaller_ODB_FS_AbstractFile->marshal( ec, &(*(_T*)v)[i].inout() );
  ec.seq_end();
}

CORBA::StaticTypeInfo *_marshaller__seq_ODB_FS_AbstractFile;

struct __tc_init_FILESYSTEMDATASOURCE {
  __tc_init_FILESYSTEMDATASOURCE()
  {
    _marshaller_ODB_FileSystemDataSource = new _Marshaller_ODB_FileSystemDataSource;

    _marshaller_ODB_FS_AbstractFile = new _Marshaller_ODB_FS_AbstractFile;

    _marshaller_ODB_FS_Directory = new _Marshaller_ODB_FS_Directory;

    _marshaller_ODB_FS_File = new _Marshaller_ODB_FS_File;

    _marshaller_ODB_FS_Impl = new _Marshaller_ODB_FS_Impl;

    _marshaller__seq_ODB_FS_AbstractFile = new _Marshaller__seq_ODB_FS_AbstractFile;

  }
};

static __tc_init_FILESYSTEMDATASOURCE __init_FILESYSTEMDATASOURCE;

//--------------------------------------------------------
//  Implementation of skeletons
//--------------------------------------------------------

// PortableServer Skeleton Class for interface ODB::FileSystemDataSource
POA_ODB::FileSystemDataSource::~FileSystemDataSource()
{
}

ODB::FileSystemDataSource_ptr
POA_ODB::FileSystemDataSource::_this ()
{
  CORBA::Object_var obj = MICO_SCOPE(PortableServer,ServantBase::_this) ();
  return ODB::FileSystemDataSource::_narrow (obj);
}

CORBA::Boolean
POA_ODB::FileSystemDataSource::_is_a (const char * repoid)
{
  if (strcmp (repoid, "IDL:ODB/FileSystemDataSource:1.0") == 0) {
    return TRUE;
  }
  if (POA_ODB::DataSource::_is_a (repoid)) {
    return TRUE;
  }
  return FALSE;
}

CORBA::InterfaceDef_ptr
POA_ODB::FileSystemDataSource::_get_interface ()
{
  CORBA::ORB_var orb = CORBA::ORB_instance ("mico-local-orb");
  CORBA::Object_var irobj = 
    orb->resolve_initial_references ("InterfaceRepository");
  CORBA::Repository_var ifr = CORBA::Repository::_narrow (irobj);
  assert (!CORBA::is_nil (ifr));

  CORBA::Contained_var cv = ifr->lookup_id ("IDL:ODB/FileSystemDataSource:1.0");
  CORBA::InterfaceDef_ptr ifd = CORBA::InterfaceDef::_narrow (cv);

  if (CORBA::is_nil (ifd)) {
    mico_throw (CORBA::OBJ_ADAPTER (0, CORBA::COMPLETED_NO));
  }

  return ifd;
}

CORBA::RepositoryId
POA_ODB::FileSystemDataSource::_primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr)
{
  return CORBA::string_dup ("IDL:ODB/FileSystemDataSource:1.0");
}

void *
POA_ODB::FileSystemDataSource::_narrow_helper (const char * repoid)
{
  void * p;
  if (strcmp (repoid, "IDL:ODB/FileSystemDataSource:1.0") == 0) {
    return (void *) this;
  }
  if ((p = POA_ODB::DataSource::_narrow_helper (repoid)) != NULL) {
    return p;
  }
  return NULL;
}

POA_ODB::FileSystemDataSource *
POA_ODB::FileSystemDataSource::_narrow (PortableServer::Servant serv) 
{
  void * p;
  if ((p = serv->_narrow_helper ("IDL:ODB/FileSystemDataSource:1.0")) != NULL) {
    return (POA_ODB::FileSystemDataSource *) p;
  }
  return NULL;
}

CORBA::Object_ptr
POA_ODB::FileSystemDataSource::_make_stub (PortableServer::POA_ptr poa, CORBA::Object_ptr obj)
{
  return new ODB::FileSystemDataSource_stub_clp (poa, obj);
}

bool
POA_ODB::FileSystemDataSource::dispatch (CORBA::StaticServerRequest_ptr _req)
{

  if (POA_ODB::DataSource::dispatch (_req)) {
    return true;
  }

  return false;
}

void
POA_ODB::FileSystemDataSource::invoke (CORBA::StaticServerRequest_ptr _req)
{
  if (dispatch (_req)) {
      return;
  }

  CORBA::Exception * ex = 
    new CORBA::BAD_OPERATION (0, CORBA::COMPLETED_NO);
  _req->set_exception (ex);
  _req->write_results();
}


// PortableServer Skeleton Class for interface ODB::FS::AbstractFile
POA_ODB::FS::AbstractFile::~AbstractFile()
{
}

ODB::FS::AbstractFile_ptr
POA_ODB::FS::AbstractFile::_this ()
{
  CORBA::Object_var obj = MICO_SCOPE(PortableServer,ServantBase::_this) ();
  return ODB::FS::AbstractFile::_narrow (obj);
}

CORBA::Boolean
POA_ODB::FS::AbstractFile::_is_a (const char * repoid)
{
  if (strcmp (repoid, "IDL:ODB/FS/AbstractFile:1.0") == 0) {
    return TRUE;
  }
  return FALSE;
}

CORBA::InterfaceDef_ptr
POA_ODB::FS::AbstractFile::_get_interface ()
{
  CORBA::ORB_var orb = CORBA::ORB_instance ("mico-local-orb");
  CORBA::Object_var irobj = 
    orb->resolve_initial_references ("InterfaceRepository");
  CORBA::Repository_var ifr = CORBA::Repository::_narrow (irobj);
  assert (!CORBA::is_nil (ifr));

  CORBA::Contained_var cv = ifr->lookup_id ("IDL:ODB/FS/AbstractFile:1.0");
  CORBA::InterfaceDef_ptr ifd = CORBA::InterfaceDef::_narrow (cv);

  if (CORBA::is_nil (ifd)) {
    mico_throw (CORBA::OBJ_ADAPTER (0, CORBA::COMPLETED_NO));
  }

  return ifd;
}

CORBA::RepositoryId
POA_ODB::FS::AbstractFile::_primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr)
{
  return CORBA::string_dup ("IDL:ODB/FS/AbstractFile:1.0");
}

void *
POA_ODB::FS::AbstractFile::_narrow_helper (const char * repoid)
{
  void * p;
  if (strcmp (repoid, "IDL:ODB/FS/AbstractFile:1.0") == 0) {
    return (void *) this;
  }
  return NULL;
}

POA_ODB::FS::AbstractFile *
POA_ODB::FS::AbstractFile::_narrow (PortableServer::Servant serv) 
{
  void * p;
  if ((p = serv->_narrow_helper ("IDL:ODB/FS/AbstractFile:1.0")) != NULL) {
    return (POA_ODB::FS::AbstractFile *) p;
  }
  return NULL;
}

CORBA::Object_ptr
POA_ODB::FS::AbstractFile::_make_stub (PortableServer::POA_ptr poa, CORBA::Object_ptr obj)
{
  return new ODB::FS::AbstractFile_stub_clp (poa, obj);
}

bool
POA_ODB::FS::AbstractFile::dispatch (CORBA::StaticServerRequest_ptr _req)
{
  #ifdef HAVE_EXCEPTIONS
  try {
  #endif
    if( strcmp( _req->op_name(), "_get_name" ) == 0 ) {
      char* _res;
      CORBA::StaticAny __res( CORBA::_stc_string );
      _req->set_result( &__res );

      if( !_req->read_args() )
        return true;

      _res = name();
      __res.value( CORBA::_stc_string, &_res );
      _req->write_results();
      CORBA::string_free( _res );
      return true;
    }
  #ifdef HAVE_EXCEPTIONS
  } catch( CORBA::SystemException_var &_ex ) {
    _req->set_exception( _ex->_clone() );
    _req->write_results();
    return true;
  } catch( ... ) {
    assert( 0 );
    return true;
  }
  #endif
  return false;
}

void
POA_ODB::FS::AbstractFile::invoke (CORBA::StaticServerRequest_ptr _req)
{
  if (dispatch (_req)) {
      return;
  }

  CORBA::Exception * ex = 
    new CORBA::BAD_OPERATION (0, CORBA::COMPLETED_NO);
  _req->set_exception (ex);
  _req->write_results();
}


// PortableServer Skeleton Class for interface ODB::FS::Directory
POA_ODB::FS::Directory::~Directory()
{
}

ODB::FS::Directory_ptr
POA_ODB::FS::Directory::_this ()
{
  CORBA::Object_var obj = MICO_SCOPE(PortableServer,ServantBase::_this) ();
  return ODB::FS::Directory::_narrow (obj);
}

CORBA::Boolean
POA_ODB::FS::Directory::_is_a (const char * repoid)
{
  if (strcmp (repoid, "IDL:ODB/FS/Directory:1.0") == 0) {
    return TRUE;
  }
  if (POA_ODB::FS::AbstractFile::_is_a (repoid)) {
    return TRUE;
  }
  return FALSE;
}

CORBA::InterfaceDef_ptr
POA_ODB::FS::Directory::_get_interface ()
{
  CORBA::ORB_var orb = CORBA::ORB_instance ("mico-local-orb");
  CORBA::Object_var irobj = 
    orb->resolve_initial_references ("InterfaceRepository");
  CORBA::Repository_var ifr = CORBA::Repository::_narrow (irobj);
  assert (!CORBA::is_nil (ifr));

  CORBA::Contained_var cv = ifr->lookup_id ("IDL:ODB/FS/Directory:1.0");
  CORBA::InterfaceDef_ptr ifd = CORBA::InterfaceDef::_narrow (cv);

  if (CORBA::is_nil (ifd)) {
    mico_throw (CORBA::OBJ_ADAPTER (0, CORBA::COMPLETED_NO));
  }

  return ifd;
}

CORBA::RepositoryId
POA_ODB::FS::Directory::_primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr)
{
  return CORBA::string_dup ("IDL:ODB/FS/Directory:1.0");
}

void *
POA_ODB::FS::Directory::_narrow_helper (const char * repoid)
{
  void * p;
  if (strcmp (repoid, "IDL:ODB/FS/Directory:1.0") == 0) {
    return (void *) this;
  }
  if ((p = POA_ODB::FS::AbstractFile::_narrow_helper (repoid)) != NULL) {
    return p;
  }
  return NULL;
}

POA_ODB::FS::Directory *
POA_ODB::FS::Directory::_narrow (PortableServer::Servant serv) 
{
  void * p;
  if ((p = serv->_narrow_helper ("IDL:ODB/FS/Directory:1.0")) != NULL) {
    return (POA_ODB::FS::Directory *) p;
  }
  return NULL;
}

CORBA::Object_ptr
POA_ODB::FS::Directory::_make_stub (PortableServer::POA_ptr poa, CORBA::Object_ptr obj)
{
  return new ODB::FS::Directory_stub_clp (poa, obj);
}

bool
POA_ODB::FS::Directory::dispatch (CORBA::StaticServerRequest_ptr _req)
{
  #ifdef HAVE_EXCEPTIONS
  try {
  #endif
    if( strcmp( _req->op_name(), "enum_files" ) == 0 ) {
      ODB::FS::Directory::DirectoryContents* _res;
      CORBA::StaticAny __res( _marshaller__seq_ODB_FS_AbstractFile );
      _req->set_result( &__res );

      if( !_req->read_args() )
        return true;

      _res = enum_files();
      __res.value( _marshaller__seq_ODB_FS_AbstractFile, _res );
      _req->write_results();
      delete _res;
      return true;
    }
  #ifdef HAVE_EXCEPTIONS
  } catch( CORBA::SystemException_var &_ex ) {
    _req->set_exception( _ex->_clone() );
    _req->write_results();
    return true;
  } catch( ... ) {
    assert( 0 );
    return true;
  }
  #endif

  if (POA_ODB::FS::AbstractFile::dispatch (_req)) {
    return true;
  }

  return false;
}

void
POA_ODB::FS::Directory::invoke (CORBA::StaticServerRequest_ptr _req)
{
  if (dispatch (_req)) {
      return;
  }

  CORBA::Exception * ex = 
    new CORBA::BAD_OPERATION (0, CORBA::COMPLETED_NO);
  _req->set_exception (ex);
  _req->write_results();
}


// PortableServer Skeleton Class for interface ODB::FS::File
POA_ODB::FS::File::~File()
{
}

ODB::FS::File_ptr
POA_ODB::FS::File::_this ()
{
  CORBA::Object_var obj = MICO_SCOPE(PortableServer,ServantBase::_this) ();
  return ODB::FS::File::_narrow (obj);
}

CORBA::Boolean
POA_ODB::FS::File::_is_a (const char * repoid)
{
  if (strcmp (repoid, "IDL:ODB/FS/File:1.0") == 0) {
    return TRUE;
  }
  if (POA_ODB::FS::AbstractFile::_is_a (repoid)) {
    return TRUE;
  }
  return FALSE;
}

CORBA::InterfaceDef_ptr
POA_ODB::FS::File::_get_interface ()
{
  CORBA::ORB_var orb = CORBA::ORB_instance ("mico-local-orb");
  CORBA::Object_var irobj = 
    orb->resolve_initial_references ("InterfaceRepository");
  CORBA::Repository_var ifr = CORBA::Repository::_narrow (irobj);
  assert (!CORBA::is_nil (ifr));

  CORBA::Contained_var cv = ifr->lookup_id ("IDL:ODB/FS/File:1.0");
  CORBA::InterfaceDef_ptr ifd = CORBA::InterfaceDef::_narrow (cv);

  if (CORBA::is_nil (ifd)) {
    mico_throw (CORBA::OBJ_ADAPTER (0, CORBA::COMPLETED_NO));
  }

  return ifd;
}

CORBA::RepositoryId
POA_ODB::FS::File::_primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr)
{
  return CORBA::string_dup ("IDL:ODB/FS/File:1.0");
}

void *
POA_ODB::FS::File::_narrow_helper (const char * repoid)
{
  void * p;
  if (strcmp (repoid, "IDL:ODB/FS/File:1.0") == 0) {
    return (void *) this;
  }
  if ((p = POA_ODB::FS::AbstractFile::_narrow_helper (repoid)) != NULL) {
    return p;
  }
  return NULL;
}

POA_ODB::FS::File *
POA_ODB::FS::File::_narrow (PortableServer::Servant serv) 
{
  void * p;
  if ((p = serv->_narrow_helper ("IDL:ODB/FS/File:1.0")) != NULL) {
    return (POA_ODB::FS::File *) p;
  }
  return NULL;
}

CORBA::Object_ptr
POA_ODB::FS::File::_make_stub (PortableServer::POA_ptr poa, CORBA::Object_ptr obj)
{
  return new ODB::FS::File_stub_clp (poa, obj);
}

bool
POA_ODB::FS::File::dispatch (CORBA::StaticServerRequest_ptr _req)
{
  #ifdef HAVE_EXCEPTIONS
  try {
  #endif
    if( strcmp( _req->op_name(), "contents" ) == 0 ) {
      ODB::FS::File::FileContents* _res;
      CORBA::StaticAny __res( CORBA::_stcseq_octet );
      _req->set_result( &__res );

      if( !_req->read_args() )
        return true;

      _res = contents();
      __res.value( CORBA::_stcseq_octet, _res );
      _req->write_results();
      delete _res;
      return true;
    }
  #ifdef HAVE_EXCEPTIONS
  } catch( CORBA::SystemException_var &_ex ) {
    _req->set_exception( _ex->_clone() );
    _req->write_results();
    return true;
  } catch( ... ) {
    assert( 0 );
    return true;
  }
  #endif

  if (POA_ODB::FS::AbstractFile::dispatch (_req)) {
    return true;
  }

  return false;
}

void
POA_ODB::FS::File::invoke (CORBA::StaticServerRequest_ptr _req)
{
  if (dispatch (_req)) {
      return;
  }

  CORBA::Exception * ex = 
    new CORBA::BAD_OPERATION (0, CORBA::COMPLETED_NO);
  _req->set_exception (ex);
  _req->write_results();
}


// PortableServer Skeleton Class for interface ODB::FS::Impl
POA_ODB::FS::Impl::~Impl()
{
}

ODB::FS::Impl_ptr
POA_ODB::FS::Impl::_this ()
{
  CORBA::Object_var obj = MICO_SCOPE(PortableServer,ServantBase::_this) ();
  return ODB::FS::Impl::_narrow (obj);
}

CORBA::Boolean
POA_ODB::FS::Impl::_is_a (const char * repoid)
{
  if (strcmp (repoid, "IDL:ODB/FS/Impl:1.0") == 0) {
    return TRUE;
  }
  if (POA_ODB::FS::File::_is_a (repoid)) {
    return TRUE;
  }
  if (POA_ODB::FS::Directory::_is_a (repoid)) {
    return TRUE;
  }
  return FALSE;
}

CORBA::InterfaceDef_ptr
POA_ODB::FS::Impl::_get_interface ()
{
  CORBA::ORB_var orb = CORBA::ORB_instance ("mico-local-orb");
  CORBA::Object_var irobj = 
    orb->resolve_initial_references ("InterfaceRepository");
  CORBA::Repository_var ifr = CORBA::Repository::_narrow (irobj);
  assert (!CORBA::is_nil (ifr));

  CORBA::Contained_var cv = ifr->lookup_id ("IDL:ODB/FS/Impl:1.0");
  CORBA::InterfaceDef_ptr ifd = CORBA::InterfaceDef::_narrow (cv);

  if (CORBA::is_nil (ifd)) {
    mico_throw (CORBA::OBJ_ADAPTER (0, CORBA::COMPLETED_NO));
  }

  return ifd;
}

CORBA::RepositoryId
POA_ODB::FS::Impl::_primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr)
{
  return CORBA::string_dup ("IDL:ODB/FS/Impl:1.0");
}

void *
POA_ODB::FS::Impl::_narrow_helper (const char * repoid)
{
  void * p;
  if (strcmp (repoid, "IDL:ODB/FS/Impl:1.0") == 0) {
    return (void *) this;
  }
  if ((p = POA_ODB::FS::File::_narrow_helper (repoid)) != NULL) {
    return p;
  }
  if ((p = POA_ODB::FS::Directory::_narrow_helper (repoid)) != NULL) {
    return p;
  }
  return NULL;
}

POA_ODB::FS::Impl *
POA_ODB::FS::Impl::_narrow (PortableServer::Servant serv) 
{
  void * p;
  if ((p = serv->_narrow_helper ("IDL:ODB/FS/Impl:1.0")) != NULL) {
    return (POA_ODB::FS::Impl *) p;
  }
  return NULL;
}

CORBA::Object_ptr
POA_ODB::FS::Impl::_make_stub (PortableServer::POA_ptr poa, CORBA::Object_ptr obj)
{
  return new ODB::FS::Impl_stub_clp (poa, obj);
}

bool
POA_ODB::FS::Impl::dispatch (CORBA::StaticServerRequest_ptr _req)
{

  if (POA_ODB::FS::File::dispatch (_req)) {
    return true;
  }

  if (POA_ODB::FS::Directory::dispatch (_req)) {
    return true;
  }

  return false;
}

void
POA_ODB::FS::Impl::invoke (CORBA::StaticServerRequest_ptr _req)
{
  if (dispatch (_req)) {
      return;
  }

  CORBA::Exception * ex = 
    new CORBA::BAD_OPERATION (0, CORBA::COMPLETED_NO);
  _req->set_exception (ex);
  _req->write_results();
}


[-- Attachment #3: filesystemdatasource.h --]
[-- Type: text/x-c++, Size: 26995 bytes --]

/*
 *  MICO --- a free CORBA implementation
 *  Copyright (C) 1997-98 Kay Roemer & Arno Puder
 *
 *  This file was automatically generated. DO NOT EDIT!
 */

#if !defined(__FILESYSTEMDATASOURCE_H__) || defined(MICO_NO_TOPLEVEL_MODULES)
#define __FILESYSTEMDATASOURCE_H__

#ifndef MICO_NO_TOPLEVEL_MODULES
#include <CORBA.h>
#include <mico/throw.h>
#endif

#ifdef MICO_IN_GENERATED_CODE
#include "../datasource.h"
#else
#define MICO_IN_GENERATED_CODE
#include "../datasource.h"
#undef MICO_IN_GENERATED_CODE
#endif

#ifndef MICO_NO_TOPLEVEL_MODULES
MICO_NAMESPACE_DECL ODB {
#endif

#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_ODB)


class FileSystemDataSource;
typedef FileSystemDataSource *FileSystemDataSource_ptr;
typedef FileSystemDataSource_ptr FileSystemDataSourceRef;
typedef ObjVar<FileSystemDataSource> FileSystemDataSource_var;
typedef FileSystemDataSource_var FileSystemDataSource_out;


// Common definitions for interface FileSystemDataSource
class FileSystemDataSource : 
  virtual public ::ODB::DataSource
{
  public:
    virtual ~FileSystemDataSource();
    static FileSystemDataSource_ptr _duplicate( FileSystemDataSource_ptr obj );
    static FileSystemDataSource_ptr _narrow( CORBA::Object_ptr obj );
    static FileSystemDataSource_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );
    static vector<CORBA::Narrow_proto> *_narrow_helpers;
    static bool _narrow_helper2( CORBA::Object_ptr obj );

  protected:
    FileSystemDataSource() {};
  private:
    FileSystemDataSource( const FileSystemDataSource& );
    void operator=( const FileSystemDataSource& );
};

// Stub for interface FileSystemDataSource
class FileSystemDataSource_stub:
  virtual public FileSystemDataSource,
  virtual public ::ODB::DataSource_stub
{
  public:
    virtual ~FileSystemDataSource_stub();
  private:
    void operator=( const FileSystemDataSource_stub& );
};

#ifndef MICO_CONF_NO_POA

class FileSystemDataSource_stub_clp :
  virtual public FileSystemDataSource_stub,
  virtual public ::ODB::DataSource_stub_clp
{
  public:
    FileSystemDataSource_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~FileSystemDataSource_stub_clp ();
  private:
    void operator=( const FileSystemDataSource_stub_clp & );
};

#endif // MICO_CONF_NO_POA

MICO_NAMESPACE_DECL FS {


class AbstractFile;
typedef AbstractFile *AbstractFile_ptr;
typedef AbstractFile_ptr AbstractFileRef;
typedef ObjVar<AbstractFile> AbstractFile_var;
typedef AbstractFile_var AbstractFile_out;


// Common definitions for interface AbstractFile
class AbstractFile : virtual public CORBA::Object
{
  public:
    virtual ~AbstractFile();
    static AbstractFile_ptr _duplicate( AbstractFile_ptr obj );
    static AbstractFile_ptr _narrow( CORBA::Object_ptr obj );
    static AbstractFile_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );
    static vector<CORBA::Narrow_proto> *_narrow_helpers;
    static bool _narrow_helper2( CORBA::Object_ptr obj );

    virtual char* name() = 0;
  protected:
    AbstractFile() {};
  private:
    AbstractFile( const AbstractFile& );
    void operator=( const AbstractFile& );
};

// Stub for interface AbstractFile
class AbstractFile_stub:
  virtual public AbstractFile
{
  public:
    virtual ~AbstractFile_stub();
    char* name();
  private:
    void operator=( const AbstractFile_stub& );
};

#ifndef MICO_CONF_NO_POA

class AbstractFile_stub_clp :
  virtual public AbstractFile_stub,
  virtual public PortableServer::StubBase
{
  public:
    AbstractFile_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~AbstractFile_stub_clp ();
    char* name();
  private:
    void operator=( const AbstractFile_stub_clp & );
};

#endif // MICO_CONF_NO_POA

class Directory;
typedef Directory *Directory_ptr;
typedef Directory_ptr DirectoryRef;
typedef ObjVar<Directory> Directory_var;
typedef Directory_var Directory_out;


// Common definitions for interface Directory
class Directory : 
  virtual public ::ODB::FS::AbstractFile
{
  public:
    virtual ~Directory();
    static Directory_ptr _duplicate( Directory_ptr obj );
    static Directory_ptr _narrow( CORBA::Object_ptr obj );
    static Directory_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );
    static vector<CORBA::Narrow_proto> *_narrow_helpers;
    static bool _narrow_helper2( CORBA::Object_ptr obj );

    typedef SequenceTmpl<AbstractFile_var,MICO_TID_DEF> DirectoryContents;
    #ifdef _WINDOWS
    static DirectoryContents _dummy_DirectoryContents;
    #endif
    typedef TSeqVar<SequenceTmpl<AbstractFile_var,MICO_TID_DEF> > DirectoryContents_var;
    typedef DirectoryContents_var DirectoryContents_out;

    virtual DirectoryContents* enum_files() = 0;
  protected:
    Directory() {};
  private:
    Directory( const Directory& );
    void operator=( const Directory& );
};

// Stub for interface Directory
class Directory_stub:
  virtual public Directory,
  virtual public ::ODB::FS::AbstractFile_stub
{
  public:
    virtual ~Directory_stub();
    DirectoryContents* enum_files();
  private:
    void operator=( const Directory_stub& );
};

#ifndef MICO_CONF_NO_POA

class Directory_stub_clp :
  virtual public Directory_stub,
  virtual public ::ODB::FS::AbstractFile_stub_clp
{
  public:
    Directory_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~Directory_stub_clp ();
    DirectoryContents* enum_files();
  private:
    void operator=( const Directory_stub_clp & );
};

#endif // MICO_CONF_NO_POA

class File;
typedef File *File_ptr;
typedef File_ptr FileRef;
typedef ObjVar<File> File_var;
typedef File_var File_out;


// Common definitions for interface File
class File : 
  virtual public ::ODB::FS::AbstractFile
{
  public:
    virtual ~File();
    static File_ptr _duplicate( File_ptr obj );
    static File_ptr _narrow( CORBA::Object_ptr obj );
    static File_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );
    static vector<CORBA::Narrow_proto> *_narrow_helpers;
    static bool _narrow_helper2( CORBA::Object_ptr obj );

    typedef SequenceTmpl<CORBA::Octet,MICO_TID_OCTET> FileContents;
    #ifdef _WINDOWS
    static FileContents _dummy_FileContents;
    #endif
    typedef TSeqVar<SequenceTmpl<CORBA::Octet,MICO_TID_OCTET> > FileContents_var;
    typedef FileContents_var FileContents_out;

    virtual FileContents* contents() = 0;
  protected:
    File() {};
  private:
    File( const File& );
    void operator=( const File& );
};

// Stub for interface File
class File_stub:
  virtual public File,
  virtual public ::ODB::FS::AbstractFile_stub
{
  public:
    virtual ~File_stub();
    FileContents* contents();
  private:
    void operator=( const File_stub& );
};

#ifndef MICO_CONF_NO_POA

class File_stub_clp :
  virtual public File_stub,
  virtual public ::ODB::FS::AbstractFile_stub_clp
{
  public:
    File_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~File_stub_clp ();
    FileContents* contents();
  private:
    void operator=( const File_stub_clp & );
};

#endif // MICO_CONF_NO_POA

class Impl;
typedef Impl *Impl_ptr;
typedef Impl_ptr ImplRef;
typedef ObjVar<Impl> Impl_var;
typedef Impl_var Impl_out;


// Common definitions for interface Impl
class Impl : 
  virtual public ::ODB::FS::File,
  virtual public ::ODB::FS::Directory
{
  public:
    virtual ~Impl();
    static Impl_ptr _duplicate( Impl_ptr obj );
    static Impl_ptr _narrow( CORBA::Object_ptr obj );
    static Impl_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );
    static vector<CORBA::Narrow_proto> *_narrow_helpers;
    static bool _narrow_helper2( CORBA::Object_ptr obj );

  protected:
    Impl() {};
  private:
    Impl( const Impl& );
    void operator=( const Impl& );
};

// Stub for interface Impl
class Impl_stub:
  virtual public Impl,
  virtual public ::ODB::FS::File_stub,
  virtual public ::ODB::FS::Directory_stub
{
  public:
    virtual ~Impl_stub();
  private:
    void operator=( const Impl_stub& );
};

#ifndef MICO_CONF_NO_POA

class Impl_stub_clp :
  virtual public Impl_stub,
  virtual public ::ODB::FS::File_stub_clp,
  virtual public ::ODB::FS::Directory_stub_clp
{
  public:
    Impl_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~Impl_stub_clp ();
  private:
    void operator=( const Impl_stub_clp & );
};

#endif // MICO_CONF_NO_POA

#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_ODB)

#ifndef MICO_NO_TOPLEVEL_MODULES

};
#endif

};


#ifndef MICO_CONF_NO_POA

#ifndef MICO_NO_TOPLEVEL_MODULES
MICO_NAMESPACE_DECL POA_ODB {
#endif

#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_POA_ODB)


class FileSystemDataSource : 
  virtual public POA_ODB::DataSource
{
  public:
    virtual ~FileSystemDataSource ();
    ODB::FileSystemDataSource_ptr _this ();
    bool dispatch (CORBA::StaticServerRequest_ptr);
    virtual void invoke (CORBA::StaticServerRequest_ptr);
    virtual CORBA::Boolean _is_a (const char *);
    virtual CORBA::InterfaceDef_ptr _get_interface ();
    virtual CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr);

    virtual void * _narrow_helper (const char *);
    static FileSystemDataSource * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);


  protected:
    FileSystemDataSource () {};

  private:
    FileSystemDataSource (const FileSystemDataSource &);
    void operator= (const FileSystemDataSource &);
};

#ifdef HAVE_NAMESPACE

template<class T>
class FileSystemDataSource_tie : 
  virtual public POA_ODB::DataSource_tie<T>,
  virtual public FileSystemDataSource
{
  public:
    FileSystemDataSource_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    FileSystemDataSource_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    FileSystemDataSource_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    FileSystemDataSource_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~FileSystemDataSource_tie ();

    PortableServer::POA_ptr _default_POA ();


  protected:
    FileSystemDataSource_tie () {};

  private:
    FileSystemDataSource_tie (const FileSystemDataSource_tie &);
    void operator= (const FileSystemDataSource_tie &);
};

template<class T>
FileSystemDataSource_tie<T>::~FileSystemDataSource_tie ()
{
}

template<class T>
PortableServer::POA_ptr
FileSystemDataSource_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

#endif

MICO_NAMESPACE_DECL FS {


class AbstractFile : virtual public PortableServer::StaticImplementation
{
  public:
    virtual ~AbstractFile ();
    ODB::FS::AbstractFile_ptr _this ();
    bool dispatch (CORBA::StaticServerRequest_ptr);
    virtual void invoke (CORBA::StaticServerRequest_ptr);
    virtual CORBA::Boolean _is_a (const char *);
    virtual CORBA::InterfaceDef_ptr _get_interface ();
    virtual CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr);

    virtual void * _narrow_helper (const char *);
    static AbstractFile * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual char* name() = 0;

  protected:
    AbstractFile () {};

  private:
    AbstractFile (const AbstractFile &);
    void operator= (const AbstractFile &);
};

#ifdef HAVE_NAMESPACE

template<class T>
class AbstractFile_tie : 
  virtual public POA_Tie_Base<T>,
  virtual public AbstractFile
{
  public:
    AbstractFile_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    AbstractFile_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    AbstractFile_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    AbstractFile_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~AbstractFile_tie ();

    PortableServer::POA_ptr _default_POA ();

    char* name();

  protected:
    AbstractFile_tie () {};

  private:
    AbstractFile_tie (const AbstractFile_tie &);
    void operator= (const AbstractFile_tie &);
};

template<class T>
AbstractFile_tie<T>::~AbstractFile_tie ()
{
}

template<class T>
PortableServer::POA_ptr
AbstractFile_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

template<class T>
char*
AbstractFile_tie<T>::name ()
{
  return POA_Tie_Base<T>::ptr->name ();
}

#endif

class Directory : 
  virtual public POA_ODB::FS::AbstractFile
{
  public:
    virtual ~Directory ();
    ODB::FS::Directory_ptr _this ();
    bool dispatch (CORBA::StaticServerRequest_ptr);
    virtual void invoke (CORBA::StaticServerRequest_ptr);
    virtual CORBA::Boolean _is_a (const char *);
    virtual CORBA::InterfaceDef_ptr _get_interface ();
    virtual CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr);

    virtual void * _narrow_helper (const char *);
    static Directory * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual ODB::FS::Directory::DirectoryContents* enum_files() = 0;

  protected:
    Directory () {};

  private:
    Directory (const Directory &);
    void operator= (const Directory &);
};

#ifdef HAVE_NAMESPACE

template<class T>
class Directory_tie : 
  virtual public POA_ODB::FS::AbstractFile_tie<T>,
  virtual public Directory
{
  public:
    Directory_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    Directory_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    Directory_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    Directory_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~Directory_tie ();

    PortableServer::POA_ptr _default_POA ();

    ODB::FS::Directory::DirectoryContents* enum_files();

  protected:
    Directory_tie () {};

  private:
    Directory_tie (const Directory_tie &);
    void operator= (const Directory_tie &);
};

template<class T>
Directory_tie<T>::~Directory_tie ()
{
}

template<class T>
PortableServer::POA_ptr
Directory_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

template<class T>
ODB::FS::Directory::DirectoryContents*
Directory_tie<T>::enum_files ()
{
  return POA_Tie_Base<T>::ptr->enum_files ();
}

#endif

class File : 
  virtual public POA_ODB::FS::AbstractFile
{
  public:
    virtual ~File ();
    ODB::FS::File_ptr _this ();
    bool dispatch (CORBA::StaticServerRequest_ptr);
    virtual void invoke (CORBA::StaticServerRequest_ptr);
    virtual CORBA::Boolean _is_a (const char *);
    virtual CORBA::InterfaceDef_ptr _get_interface ();
    virtual CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr);

    virtual void * _narrow_helper (const char *);
    static File * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual ODB::FS::File::FileContents* contents() = 0;

  protected:
    File () {};

  private:
    File (const File &);
    void operator= (const File &);
};

#ifdef HAVE_NAMESPACE

template<class T>
class File_tie : 
  virtual public POA_ODB::FS::AbstractFile_tie<T>,
  virtual public File
{
  public:
    File_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    File_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    File_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    File_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~File_tie ();

    PortableServer::POA_ptr _default_POA ();

    ODB::FS::File::FileContents* contents();

  protected:
    File_tie () {};

  private:
    File_tie (const File_tie &);
    void operator= (const File_tie &);
};

template<class T>
File_tie<T>::~File_tie ()
{
}

template<class T>
PortableServer::POA_ptr
File_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

template<class T>
ODB::FS::File::FileContents*
File_tie<T>::contents ()
{
  return POA_Tie_Base<T>::ptr->contents ();
}

#endif

class Impl : 
  virtual public POA_ODB::FS::File,
  virtual public POA_ODB::FS::Directory
{
  public:
    virtual ~Impl ();
    ODB::FS::Impl_ptr _this ();
    bool dispatch (CORBA::StaticServerRequest_ptr);
    virtual void invoke (CORBA::StaticServerRequest_ptr);
    virtual CORBA::Boolean _is_a (const char *);
    virtual CORBA::InterfaceDef_ptr _get_interface ();
    virtual CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr);

    virtual void * _narrow_helper (const char *);
    static Impl * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);


  protected:
    Impl () {};

  private:
    Impl (const Impl &);
    void operator= (const Impl &);
};

#ifdef HAVE_NAMESPACE

template<class T>
class Impl_tie : 
  virtual public POA_ODB::FS::File_tie<T>,
  virtual public POA_ODB::FS::Directory_tie<T>,
  virtual public Impl
{
  public:
    Impl_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    Impl_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    Impl_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    Impl_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~Impl_tie ();

    PortableServer::POA_ptr _default_POA ();


  protected:
    Impl_tie () {};

  private:
    Impl_tie (const Impl_tie &);
    void operator= (const Impl_tie &);
};

template<class T>
Impl_tie<T>::~Impl_tie ()
{
}

template<class T>
PortableServer::POA_ptr
Impl_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

#endif

#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_POA_ODB)

#ifndef MICO_NO_TOPLEVEL_MODULES

};
#endif

};


#ifndef HAVE_NAMESPACE

template<class T>
class POA_ODB_FileSystemDataSource_tie : 
  virtual public POA_ODB_DataSource_tie<T>,
  virtual public POA_ODB::FileSystemDataSource
{
  public:
    POA_ODB_FileSystemDataSource_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    POA_ODB_FileSystemDataSource_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    POA_ODB_FileSystemDataSource_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    POA_ODB_FileSystemDataSource_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~POA_ODB_FileSystemDataSource_tie ();

    PortableServer::POA_ptr _default_POA ();


  protected:
    POA_ODB_FileSystemDataSource_tie () {};

  private:
    POA_ODB_FileSystemDataSource_tie (const POA_ODB_FileSystemDataSource_tie &);
    void operator= (const POA_ODB_FileSystemDataSource_tie &);
};

template<class T>
POA_ODB_FileSystemDataSource_tie<T>::~POA_ODB_FileSystemDataSource_tie ()
{
}

template<class T>
PortableServer::POA_ptr
POA_ODB_FileSystemDataSource_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

#endif

#ifndef HAVE_NAMESPACE

template<class T>
class POA_ODB_FS_AbstractFile_tie : 
  virtual public POA_Tie_Base<T>,
  virtual public POA_ODB::FS::AbstractFile
{
  public:
    POA_ODB_FS_AbstractFile_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    POA_ODB_FS_AbstractFile_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    POA_ODB_FS_AbstractFile_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    POA_ODB_FS_AbstractFile_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~POA_ODB_FS_AbstractFile_tie ();

    PortableServer::POA_ptr _default_POA ();

    char* name();

  protected:
    POA_ODB_FS_AbstractFile_tie () {};

  private:
    POA_ODB_FS_AbstractFile_tie (const POA_ODB_FS_AbstractFile_tie &);
    void operator= (const POA_ODB_FS_AbstractFile_tie &);
};

template<class T>
POA_ODB_FS_AbstractFile_tie<T>::~POA_ODB_FS_AbstractFile_tie ()
{
}

template<class T>
PortableServer::POA_ptr
POA_ODB_FS_AbstractFile_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

template<class T>
char*
POA_ODB_FS_AbstractFile_tie<T>::name ()
{
  return POA_Tie_Base<T>::ptr->name ();
}

#endif

#ifndef HAVE_NAMESPACE

template<class T>
class POA_ODB_FS_Directory_tie : 
  virtual public POA_ODB_FS_AbstractFile_tie<T>,
  virtual public POA_ODB::FS::Directory
{
  public:
    POA_ODB_FS_Directory_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    POA_ODB_FS_Directory_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    POA_ODB_FS_Directory_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    POA_ODB_FS_Directory_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~POA_ODB_FS_Directory_tie ();

    PortableServer::POA_ptr _default_POA ();

    ODB::FS::Directory::DirectoryContents* enum_files();

  protected:
    POA_ODB_FS_Directory_tie () {};

  private:
    POA_ODB_FS_Directory_tie (const POA_ODB_FS_Directory_tie &);
    void operator= (const POA_ODB_FS_Directory_tie &);
};

template<class T>
POA_ODB_FS_Directory_tie<T>::~POA_ODB_FS_Directory_tie ()
{
}

template<class T>
PortableServer::POA_ptr
POA_ODB_FS_Directory_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

template<class T>
ODB::FS::Directory::DirectoryContents*
POA_ODB_FS_Directory_tie<T>::enum_files ()
{
  return POA_Tie_Base<T>::ptr->enum_files ();
}

#endif

#ifndef HAVE_NAMESPACE

template<class T>
class POA_ODB_FS_File_tie : 
  virtual public POA_ODB_FS_AbstractFile_tie<T>,
  virtual public POA_ODB::FS::File
{
  public:
    POA_ODB_FS_File_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    POA_ODB_FS_File_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    POA_ODB_FS_File_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    POA_ODB_FS_File_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~POA_ODB_FS_File_tie ();

    PortableServer::POA_ptr _default_POA ();

    ODB::FS::File::FileContents* contents();

  protected:
    POA_ODB_FS_File_tie () {};

  private:
    POA_ODB_FS_File_tie (const POA_ODB_FS_File_tie &);
    void operator= (const POA_ODB_FS_File_tie &);
};

template<class T>
POA_ODB_FS_File_tie<T>::~POA_ODB_FS_File_tie ()
{
}

template<class T>
PortableServer::POA_ptr
POA_ODB_FS_File_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

template<class T>
ODB::FS::File::FileContents*
POA_ODB_FS_File_tie<T>::contents ()
{
  return POA_Tie_Base<T>::ptr->contents ();
}

#endif

#ifndef HAVE_NAMESPACE

template<class T>
class POA_ODB_FS_Impl_tie : 
  virtual public POA_ODB_FS_File_tie<T>,
  virtual public POA_ODB_FS_Directory_tie<T>,
  virtual public POA_ODB::FS::Impl
{
  public:
    POA_ODB_FS_Impl_tie (T &t)
      : POA_Tie_Base<T> (&t, PortableServer::POA::_nil(), FALSE)
    {}
    POA_ODB_FS_Impl_tie (T &t, PortableServer::POA_ptr _poa)
      : POA_Tie_Base<T> (&t, _poa, FALSE)
    {}
    POA_ODB_FS_Impl_tie (T *t, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, PortableServer::POA::_nil(), _rel)
    {}
    POA_ODB_FS_Impl_tie (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel = TRUE)
      : POA_Tie_Base<T> (t, _poa, _rel)
    {}
    virtual ~POA_ODB_FS_Impl_tie ();

    PortableServer::POA_ptr _default_POA ();


  protected:
    POA_ODB_FS_Impl_tie () {};

  private:
    POA_ODB_FS_Impl_tie (const POA_ODB_FS_Impl_tie &);
    void operator= (const POA_ODB_FS_Impl_tie &);
};

template<class T>
POA_ODB_FS_Impl_tie<T>::~POA_ODB_FS_Impl_tie ()
{
}

template<class T>
PortableServer::POA_ptr
POA_ODB_FS_Impl_tie<T>::_default_POA ()
{
  if (!CORBA::is_nil (POA_Tie_Base<T>::poa)) {
    return PortableServer::POA::_duplicate (POA_Tie_Base<T>::poa);
  }
  return PortableServer::ServantBase::_default_POA ();
}

#endif

#endif // MICO_CONF_NO_POA

#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE__GLOBAL)

extern CORBA::StaticTypeInfo *_marshaller_ODB_FileSystemDataSource;
extern CORBA::StaticTypeInfo *_marshaller_ODB_FS_AbstractFile;
extern CORBA::StaticTypeInfo *_marshaller_ODB_FS_Directory;
extern CORBA::StaticTypeInfo *_marshaller_ODB_FS_File;
extern CORBA::StaticTypeInfo *_marshaller_ODB_FS_Impl;
extern CORBA::StaticTypeInfo *_marshaller__seq_ODB_FS_AbstractFile;
#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE__GLOBAL)


#if !defined(MICO_NO_TOPLEVEL_MODULES) && !defined(MICO_IN_GENERATED_CODE)
#include <mico/template_impl.h>
#endif

#endif

[-- Attachment #4: filesystemdatasource_impl.cc --]
[-- Type: text/x-c++, Size: 6023 bytes --]

/**
 * $FILE filesystemdatasource_impl.cc
 * $VERSION 1.00
 * $DATE 05 Feb 1999
 * $AUTHOR Joerg Fischer
 */
#include <fstream.h>
#include "filesystemdatasource_impl.h"

namespace ODB {

static const char* file_repoid      = "IDL:ODB/FS/File:1.0";
static const char* directory_repoid = "IDL:ODB/FS/Directory:1.0";

namespace FS {

FileServant::FileServant(ODB::FileSystemDataSource_impl* parent)
{
    m_parent = parent;
}

char* FileServant::name()    
{
    return m_parent->reference_to_name(_this());
}

ODB::FS::Directory::DirectoryContents* FileServant::enum_files()
{
    CORBA::String_var fileName                    = name();
    ODB::FS::Directory::DirectoryContents* retVal = new ODB::FS::Directory::DirectoryContents();
    unsigned long length                          = 0;
    DIR* dir                                      = opendir(fileName);
    
    if(dir) {
        struct dirent* dir_info = readdir(dir);
        while(dir_info) {
            CORBA::Object_var obj           = m_parent->issue_reference(dir_info->d_name); 
            ODB::FS::AbstractFile_ptr entry = ODB::FS::AbstractFile::_narrow(obj);
            
            // insert into list
            retVal->length(length+1);
            (*retVal)[length] = entry;
            length++;
            
            // continue loop
            dir_info = readdir(dir);
        }
        
        closedir(dir);
    }
    
    return retVal;
}

ODB::FS::File::FileContents* FileServant::contents()
{
    CORBA::String_var fileName          = name();
    ODB::FS::File::FileContents* retVal = new ODB::FS::File::FileContents();
    unsigned long length                = 0;
    unsigned char chr;
    ifstream file(fileName);
    
    // read file contents thereby enlarging the buffer
    while(!file.eof()) {
        retVal->length(length+1);
        file >> chr;
        (*retVal)[length] = chr;
        length++;
    }
    
    return retVal;    
}

bool FileServant::dispatch(CORBA::ServerRequest_ptr req)
{
    bool retVal = true;

    try {
        if(strcmp(req->op_name(), "contents" ) == 0) {
            CORBA::NVList_ptr args = new CORBA::NVList (0);

            if (!req->params(args)) {
                retVal = false;
            }

            ODB::FS::File::FileContents* res;
            res = contents();
            CORBA::Any *any_res = new CORBA::Any;
            *any_res <<= *res;
            delete res;
            req->result(any_res);
            return true;
        } else if(strcmp(req->op_name(), "enum_files") == 0) {
            CORBA::NVList_ptr _args = new CORBA::NVList (0);

            if(!req->params(_args)) {
                retVal = false;
            }

            ODB::FS::Directory::DirectoryContents* res;
            res = enum_files();
            CORBA::Any *any_res = new CORBA::Any;
            *any_res <<= *res;
            delete res;
            req->result(any_res);
        } else if(strcmp(req->op_name(), "_get_name") == 0) {
            CORBA::NVList_ptr args = new CORBA::NVList (0);

            if (!req->params( args )) {
                retVal = false;
            }

            char* res;
            res = name();
            CORBA::Any *any_res = new CORBA::Any;
            *any_res <<= res;
            CORBA::string_free( res );
            req->result( any_res );
        } else {
            retVal = false;
        }
    } catch( CORBA::SystemException_var &ex ) {
        req->exception( ex->_clone() );
        retVal = false;
    } catch( ... ) {
        assert( 0 );
        retVal = false;
    }

    return retVal;

}

void FileServant::invoke(CORBA::ServerRequest_ptr req)
{
    // Only one request may be handled at a time
    assert(!m_serialize);
    m_serialize = true;

    if(!dispatch(req)) {
        CORBA::Exception * ex = new CORBA::BAD_OPERATION (0, CORBA::COMPLETED_NO);
        req->exception (ex);    
    }

    m_serialize = false;
}

CORBA::RepositoryId _primary_interface(const PortableServer::ObjectId& oid, PortableServer::POA_ptr poa)
{
    return CORBA::string_dup("IDL:ODB/FS/AbstractFile:1.0");
}

}; // namespace FS

FileSystemDataSource_impl::FileSystemDataSource_impl(CORBA::ORB* orb, const char* name)
  : DataSource_impl(orb, name)
{
}

FileSystemDataSource_impl::~FileSystemDataSource_impl()
{
}

PortableServer::Servant FileSystemDataSource_impl::create_servant()
{
    return new ODB::FS::FileServant(this);
}

ODB::DataSource::DomainList* FileSystemDataSource_impl::enum_domains()
{
    ODB::DataSource::DomainList* retVal = new ODB::DataSource::DomainList();
    CORBA::Any* entry                   = new CORBA::Any();    
    
    // Create the object id for directory entry
    PortableServer::ObjectId_var oid = PortableServer::string_to_ObjectId("demo");

    // create virtual object reference
    CORBA::Object_var obj            = poa()->create_reference_with_id(oid, "IDL:AbstractFile:1.0");
    ODB::FS::AbstractFile_ptr rootDir = ODB::FS::AbstractFile::_narrow(obj);

    // Insert into any
    *entry <<= rootDir;

    // insert into list
    retVal->length(1);
    (*retVal)[0] = *entry;

    return retVal;
}

CORBA::Object* FileSystemDataSource_impl::issue_reference(const char* name)
{
    // Create the object id for directory entry
    PortableServer::ObjectId_var oid = PortableServer::string_to_ObjectId(name);
            
    // create virtual object reference
    CORBA::Object_ptr obj = poa()->create_reference_with_id(oid, is_directory(name) ? directory_repoid : file_repoid);

    return obj;
}

char* FileSystemDataSource_impl::reference_to_name(CORBA::Object_ptr obj)
{
    PortableServer::ObjectId_var oid = poa()->reference_to_id(obj);

    return PortableServer::ObjectId_to_string(oid);
}

bool is_directory(const char* name)
{
    struct stat filestat;

    return !stat(name, &filestat) && S_ISDIR(filestat.st_mode);
}

bool FileSystemDataSource_impl::is_file(const char* name)
{
    struct stat filestat;

    return !stat(name, &filestat) && S_ISREG(filestat.st_mode);
}


}; // namespace ODB

[-- Attachment #5: filesystemdatasource_impl.h --]
[-- Type: text/x-c++, Size: 3188 bytes --]

/**
 * $FILE filesystem.h
 * $VERSION 1.00
 * $AUTHOR Joerg Fischer
 * $DATE 03 Feb 1999
 */
#ifndef ODB_FILESYSTEM_H
#define ODB_FILESYSTEM_H

#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include <unistd.h>
#include "../datasource.h"
#include "filesystemdatasource.h"
#include "../datasource_impl.h"

namespace ODB {

class FileSystemDataSource_impl;

namespace FS {

/**
 * Universal servant for both files and directories
 */
class FileServant : public ::PortableServer::DynamicImplementation {
public:
    FileServant(ODB::FileSystemDataSource_impl* parent);
    
    virtual ~FileServant();
    
    /**
     * get directory contents
     * @return the contents
     */
    ODB::FS::Directory::DirectoryContents* enum_files();
    
    /**
     * get the file contents
     * @return the contents
     */
    ODB::FS::File::FileContents* contents();

    /**
     * get the name of the file the servant is handling
     * (only valid during request handling)
     * @return the name
     */
    char* name();
    
    /**
     * the dynamic dispatching function
     * @param req the request block
     * @return success indicator
     */
    bool dispatch(CORBA::ServerRequest_ptr req);

    /**
     * the invocation routine
     * @param req the request to be served
     */
    void invoke(CORBA::ServerRequest_ptr req);
    
    /**
     * get repository id
     * @param oid the object id
     * @param poa the poa
     * @return the repoid
     */
    CORBA::RepositoryId _primary_interface(const PortableServer::ObjectId& oid, PortableServer::POA_ptr poa);
    
    
    
protected:
    ODB::FileSystemDataSource_impl* m_parent;
    CORBA::Object_var               m_self;
    bool                            m_serialize;
};

}; // namespace FS

class FileSystemDataSource_impl : virtual public DataSource_impl, virtual public POA_ODB::FileSystemDataSource {
public:
    /**
     * create File System Data Source
     * @param boa the boa
     * @param name of the data source (must be unique)
     */
    FileSystemDataSource_impl(CORBA::ORB* orb, const char* name);
    
    /**
     * destructor
     */
    virtual ~FileSystemDataSource_impl();

    /**
     * get the universal servant
     * @return the servant
     */
    PortableServer::Servant create_servant();

    /**
     * get the list of all domains
     * @return the domain list
     */
    ODB::DataSource::DomainList* enum_domains();

    /**
     * issue a object reference
     * @param name the requested object string
     * @return the object reference
     */
    CORBA::Object* issue_reference(const char* name);

    /**
     * convert reference to file name
     * @param obj the object reference
     * @return the file name
     */
    char* reference_to_name(CORBA::Object_ptr obj);
    
    /**
     * check if given file is directory
     * @param name the file name
     * @return boolean indicator
     */
    bool is_directory(const char* name);
    
    /**
     * check if given file is regulary file
     * @param name the file name
     * @return boolean indicator
     */
    bool is_file(const char* name);
    
    
private:   
};

}; // namespace ODB

#endif

[-- Attachment #6: poa.h --]
[-- Type: text/x-c++, Size: 41310 bytes --]

// -*- c++ -*-

/*
 *  MICO --- a free CORBA implementation
 *  Copyright (C) 1997-98 Kay Roemer & Arno Puder
 *
 *  This file was automatically generated. DO NOT EDIT!
 */

#if !defined(__POA_H__) || defined(MICO_NO_TOPLEVEL_MODULES)
#define __POA_H__

#if 0
#ifndef MICO_NO_TOPLEVEL_MODULES
#include <CORBA.h>
#include <mico/throw.h>
#endif
#endif

#if 0
#ifdef MICO_IN_GENERATED_CODE
#include <mico/ir.h>
#else
#define MICO_IN_GENERATED_CODE
#include <mico/ir.h>
#undef MICO_IN_GENERATED_CODE
#endif
#endif

#ifdef MICO_IN_GENERATED_CODE
#include <mico/policy.h>
#else
#define MICO_IN_GENERATED_CODE
#include <mico/policy.h>
#undef MICO_IN_GENERATED_CODE
#endif

#ifdef MICO_IN_GENERATED_CODE
#include <mico/current.h>
#else
#define MICO_IN_GENERATED_CODE
#include <mico/current.h>
#undef MICO_IN_GENERATED_CODE
#endif

#ifndef MICO_NO_TOPLEVEL_MODULES
MICO_NAMESPACE_DECL PortableServer {
#endif

#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_PortableServer)


typedef SequenceTmpl<CORBA::Octet,MICO_TID_OCTET> ObjectId;
#ifdef _WINDOWS
static ObjectId _dummy_ObjectId;
#endif
typedef TSeqVar<SequenceTmpl<CORBA::Octet,MICO_TID_OCTET> > ObjectId_var;
typedef ObjectId_var ObjectId_out;

MICO_EXPORT_VAR_DECL CORBA::TypeCodeConst _tc_ObjectId;

// begin-idl-hack
class ServantBase;
typedef ServantBase * Servant;

class POA;
typedef POA *__POA_ptr;

class ServantBase
{
public:
  virtual ~ServantBase ();

  virtual __POA_ptr _default_POA();
  virtual CORBA::Boolean _is_a (const char *);
  virtual CORBA::Boolean _non_existent ();
  virtual CORBA::InterfaceDef_ptr _get_interface () = 0;

  // begin-mico-extension (moved up from DynamicImplementation)
  CORBA::Object_ptr _this ();
  virtual CORBA::RepositoryId _primary_interface (const ObjectId &,
						  __POA_ptr) = 0;
  // end-mico-extension

  virtual void _add_ref ();
  virtual void _remove_ref ();
  
  // begin-mico-extension
  virtual void _check ();
  virtual void * _narrow_helper (const char *);
  virtual CORBA::Object_ptr _make_stub (__POA_ptr, CORBA::Object_ptr);
  virtual CORBA::ServerRequestBase_ptr make_request (CORBA::ORBRequest *,
						     CORBA::Object_ptr,
						     CORBA::ULong,
						     CORBA::ObjectAdapter *,
						     CORBA::Principal_ptr) = 0;
  virtual void doinvoke (CORBA::ServerRequestBase_ptr) = 0;

  __POA_ptr _activated_in ();
  void _activated_in (__POA_ptr);
  // end-mico-extension

protected:
  ServantBase ();
  ServantBase (const ServantBase &);
  ServantBase & operator= (const ServantBase &);
  __POA_ptr _my_poa;
};

class RefCountServantBase : public virtual ServantBase
{
public:
  virtual ~RefCountServantBase ();

  virtual void _add_ref ();
  virtual void _remove_ref ();

  // begin-mico-extension
  void _check ();
  // end-mico-extension

protected:
  RefCountServantBase ();
  RefCountServantBase (const RefCountServantBase &);
  RefCountServantBase & operator= (const RefCountServantBase &);

private:
  CORBA::ULong _magic;
  CORBA::ULong _ref_count;
};

class DynamicImplementation : public virtual ServantBase
{
public:
  virtual ~DynamicImplementation ();

  /*
   * Defined in ServantBase:
   *
   *  CORBA::Object_ptr _this ();
   *  virtual CORBA::RepositoryId _primary_interface (const ObjectId &,
   *                                                  __POA_ptr) = 0;
   */

  CORBA::InterfaceDef_ptr _get_interface ();
  virtual void invoke (CORBA::ServerRequest_ptr) = 0;

  // begin-mico-extension
  CORBA::ServerRequestBase_ptr make_request (CORBA::ORBRequest *,
					     CORBA::Object_ptr,
					     CORBA::ULong,
					     CORBA::ObjectAdapter *,
					     CORBA::Principal_ptr);
  void doinvoke (CORBA::ServerRequestBase_ptr);
  // end-mico-extension
};

// begin-mico-extension
class StaticImplementation : public virtual ServantBase
{
public:
  virtual ~StaticImplementation ();
  virtual void invoke (CORBA::StaticServerRequest_ptr) = 0;
  CORBA::ServerRequestBase_ptr make_request (CORBA::ORBRequest *,
					     CORBA::Object_ptr,
					     CORBA::ULong,
					     CORBA::ObjectAdapter *,
					     CORBA::Principal_ptr);
  virtual void doinvoke (CORBA::ServerRequestBase_ptr);
};
// end-mico-extension

class ServantBase_var
{
public:
  ServantBase_var ();
  ServantBase_var (ServantBase *);
  ServantBase_var (const ServantBase_var &);
  ~ServantBase_var ();

  ServantBase_var & operator= (ServantBase *);
  ServantBase_var & operator= (const ServantBase_var &);

  ServantBase * operator->() const;
  ServantBase * in () const;
  ServantBase *& inout ();
  ServantBase *& out ();
  ServantBase * _retn ();

private:
  ServantBase * _ptr;
};

// begin-mico-extension
class StubBase : virtual public CORBA::Object {
public:
  StubBase (__POA_ptr);
  virtual ~StubBase ();

  PortableServer::Servant _preinvoke ();
  void _postinvoke ();

private:
  __POA_ptr colocated_poa;
};
// end-mico-extension

MICO_EXPORT_DECL char *         ObjectId_to_string  (const ObjectId &);
MICO_EXPORT_DECL CORBA::WChar * ObjectId_to_wstring (const ObjectId &);
MICO_EXPORT_DECL ObjectId *     string_to_ObjectId  (const char *);
MICO_EXPORT_DECL ObjectId *     wstring_to_ObjectId (const CORBA::WChar *);
// end-idl-hack

struct ForwardRequest : public CORBA::UserException {
  #ifdef HAVE_EXPLICIT_STRUCT_OPS
  ForwardRequest();
  ~ForwardRequest();
  ForwardRequest( const ForwardRequest& s );
  ForwardRequest& operator=( const ForwardRequest& s );
  #endif //HAVE_EXPLICIT_STRUCT_OPS

  #ifndef HAVE_EXPLICIT_STRUCT_OPS
  ForwardRequest();
  #endif //HAVE_EXPLICIT_STRUCT_OPS
  ForwardRequest( CORBA::Object_ptr _m0 );
  void _throwit() const;
  const char *_repoid() const;
  void _encode( CORBA::DataEncoder &en ) const;
  CORBA::Exception *_clone() const;
  static ForwardRequest *_downcast( CORBA::Exception *ex );
  CORBA::Object_var forward_reference;
};

typedef ExceptVar<ForwardRequest> ForwardRequest_var;
typedef ForwardRequest_var ForwardRequest_out;

MICO_EXPORT_VAR_DECL CORBA::TypeCodeConst _tc_ForwardRequest;

MICO_EXPORT_VAR_DECL const CORBA::ULong THREAD_POLICY_ID;
MICO_EXPORT_VAR_DECL const CORBA::ULong LIFESPAN_POLICY_ID;
MICO_EXPORT_VAR_DECL const CORBA::ULong ID_UNIQUENESS_POLICY_ID;
MICO_EXPORT_VAR_DECL const CORBA::ULong ID_ASSIGNMENT_POLICY_ID;
MICO_EXPORT_VAR_DECL const CORBA::ULong IMPLICIT_ACTIVATION_POLICY_ID;
MICO_EXPORT_VAR_DECL const CORBA::ULong SERVANT_RETENTION_POLICY_ID;
MICO_EXPORT_VAR_DECL const CORBA::ULong REQUEST_PROCESSING_POLICY_ID;
enum ThreadPolicyValue {
  ORB_CTRL_MODEL = 0,
  SINGLE_THREAD_MODEL
};

typedef ThreadPolicyValue& ThreadPolicyValue_out;

MICO_EXPORT_VAR_DECL CORBA::TypeCodeConst _tc_ThreadPolicyValue;

class ThreadPolicy;
typedef ThreadPolicy *ThreadPolicy_ptr;
typedef ThreadPolicy_ptr ThreadPolicyRef;
typedef ObjVar<ThreadPolicy> ThreadPolicy_var;
typedef ThreadPolicy_var ThreadPolicy_out;


// Common definitions for interface ThreadPolicy
class ThreadPolicy : 
  virtual public ::CORBA::Policy
{
  public:
    virtual ~ThreadPolicy();
    static ThreadPolicy_ptr _duplicate( ThreadPolicy_ptr obj );
    static ThreadPolicy_ptr _narrow( CORBA::Object_ptr obj );
    static ThreadPolicy_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

    virtual ThreadPolicyValue value() = 0;
  protected:
    ThreadPolicy() {};
  private:
    ThreadPolicy( const ThreadPolicy& );
    void operator=( const ThreadPolicy& );
};


enum LifespanPolicyValue {
  TRANSIENT = 0,
  PERSISTENT
};

typedef LifespanPolicyValue& LifespanPolicyValue_out;

MICO_EXPORT_VAR_DECL CORBA::TypeCodeConst _tc_LifespanPolicyValue;

class LifespanPolicy;
typedef LifespanPolicy *LifespanPolicy_ptr;
typedef LifespanPolicy_ptr LifespanPolicyRef;
typedef ObjVar<LifespanPolicy> LifespanPolicy_var;
typedef LifespanPolicy_var LifespanPolicy_out;


// Common definitions for interface LifespanPolicy
class LifespanPolicy : 
  virtual public ::CORBA::Policy
{
  public:
    virtual ~LifespanPolicy();
    static LifespanPolicy_ptr _duplicate( LifespanPolicy_ptr obj );
    static LifespanPolicy_ptr _narrow( CORBA::Object_ptr obj );
    static LifespanPolicy_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

    virtual LifespanPolicyValue value() = 0;
  protected:
    LifespanPolicy() {};
  private:
    LifespanPolicy( const LifespanPolicy& );
    void operator=( const LifespanPolicy& );
};


enum IdUniquenessPolicyValue {
  UNIQUE_ID = 0,
  MULTIPLE_ID
};

typedef IdUniquenessPolicyValue& IdUniquenessPolicyValue_out;

MICO_EXPORT_VAR_DECL CORBA::TypeCodeConst _tc_IdUniquenessPolicyValue;

class IdUniquenessPolicy;
typedef IdUniquenessPolicy *IdUniquenessPolicy_ptr;
typedef IdUniquenessPolicy_ptr IdUniquenessPolicyRef;
typedef ObjVar<IdUniquenessPolicy> IdUniquenessPolicy_var;
typedef IdUniquenessPolicy_var IdUniquenessPolicy_out;


// Common definitions for interface IdUniquenessPolicy
class IdUniquenessPolicy : 
  virtual public ::CORBA::Policy
{
  public:
    virtual ~IdUniquenessPolicy();
    static IdUniquenessPolicy_ptr _duplicate( IdUniquenessPolicy_ptr obj );
    static IdUniquenessPolicy_ptr _narrow( CORBA::Object_ptr obj );
    static IdUniquenessPolicy_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

    virtual IdUniquenessPolicyValue value() = 0;
  protected:
    IdUniquenessPolicy() {};
  private:
    IdUniquenessPolicy( const IdUniquenessPolicy& );
    void operator=( const IdUniquenessPolicy& );
};


enum IdAssignmentPolicyValue {
  USER_ID = 0,
  SYSTEM_ID
};

typedef IdAssignmentPolicyValue& IdAssignmentPolicyValue_out;

MICO_EXPORT_VAR_DECL CORBA::TypeCodeConst _tc_IdAssignmentPolicyValue;

class IdAssignmentPolicy;
typedef IdAssignmentPolicy *IdAssignmentPolicy_ptr;
typedef IdAssignmentPolicy_ptr IdAssignmentPolicyRef;
typedef ObjVar<IdAssignmentPolicy> IdAssignmentPolicy_var;
typedef IdAssignmentPolicy_var IdAssignmentPolicy_out;


// Common definitions for interface IdAssignmentPolicy
class IdAssignmentPolicy : 
  virtual public ::CORBA::Policy
{
  public:
    virtual ~IdAssignmentPolicy();
    static IdAssignmentPolicy_ptr _duplicate( IdAssignmentPolicy_ptr obj );
    static IdAssignmentPolicy_ptr _narrow( CORBA::Object_ptr obj );
    static IdAssignmentPolicy_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

    virtual IdAssignmentPolicyValue value() = 0;
  protected:
    IdAssignmentPolicy() {};
  private:
    IdAssignmentPolicy( const IdAssignmentPolicy& );
    void operator=( const IdAssignmentPolicy& );
};


enum ImplicitActivationPolicyValue {
  IMPLICIT_ACTIVATION = 0,
  NO_IMPLICIT_ACTIVATION
};

typedef ImplicitActivationPolicyValue& ImplicitActivationPolicyValue_out;

MICO_EXPORT_VAR_DECL CORBA::TypeCodeConst _tc_ImplicitActivationPolicyValue;

class ImplicitActivationPolicy;
typedef ImplicitActivationPolicy *ImplicitActivationPolicy_ptr;
typedef ImplicitActivationPolicy_ptr ImplicitActivationPolicyRef;
typedef ObjVar<ImplicitActivationPolicy> ImplicitActivationPolicy_var;
typedef ImplicitActivationPolicy_var ImplicitActivationPolicy_out;


// Common definitions for interface ImplicitActivationPolicy
class ImplicitActivationPolicy : 
  virtual public ::CORBA::Policy
{
  public:
    virtual ~ImplicitActivationPolicy();
    static ImplicitActivationPolicy_ptr _duplicate( ImplicitActivationPolicy_ptr obj );
    static ImplicitActivationPolicy_ptr _narrow( CORBA::Object_ptr obj );
    static ImplicitActivationPolicy_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

    virtual ImplicitActivationPolicyValue value() = 0;
  protected:
    ImplicitActivationPolicy() {};
  private:
    ImplicitActivationPolicy( const ImplicitActivationPolicy& );
    void operator=( const ImplicitActivationPolicy& );
};


enum ServantRetentionPolicyValue {
  RETAIN = 0,
  NON_RETAIN
};

typedef ServantRetentionPolicyValue& ServantRetentionPolicyValue_out;

MICO_EXPORT_VAR_DECL CORBA::TypeCodeConst _tc_ServantRetentionPolicyValue;

class ServantRetentionPolicy;
typedef ServantRetentionPolicy *ServantRetentionPolicy_ptr;
typedef ServantRetentionPolicy_ptr ServantRetentionPolicyRef;
typedef ObjVar<ServantRetentionPolicy> ServantRetentionPolicy_var;
typedef ServantRetentionPolicy_var ServantRetentionPolicy_out;


// Common definitions for interface ServantRetentionPolicy
class ServantRetentionPolicy : 
  virtual public ::CORBA::Policy
{
  public:
    virtual ~ServantRetentionPolicy();
    static ServantRetentionPolicy_ptr _duplicate( ServantRetentionPolicy_ptr obj );
    static ServantRetentionPolicy_ptr _narrow( CORBA::Object_ptr obj );
    static ServantRetentionPolicy_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

    virtual ServantRetentionPolicyValue value() = 0;
  protected:
    ServantRetentionPolicy() {};
  private:
    ServantRetentionPolicy( const ServantRetentionPolicy& );
    void operator=( const ServantRetentionPolicy& );
};


enum RequestProcessingPolicyValue {
  USE_ACTIVE_OBJECT_MAP_ONLY = 0,
  USE_DEFAULT_SERVANT,
  USE_SERVANT_MANAGER
};

typedef RequestProcessingPolicyValue& RequestProcessingPolicyValue_out;

MICO_EXPORT_VAR_DECL CORBA::TypeCodeConst _tc_RequestProcessingPolicyValue;

class RequestProcessingPolicy;
typedef RequestProcessingPolicy *RequestProcessingPolicy_ptr;
typedef RequestProcessingPolicy_ptr RequestProcessingPolicyRef;
typedef ObjVar<RequestProcessingPolicy> RequestProcessingPolicy_var;
typedef RequestProcessingPolicy_var RequestProcessingPolicy_out;


// Common definitions for interface RequestProcessingPolicy
class RequestProcessingPolicy : 
  virtual public ::CORBA::Policy
{
  public:
    virtual ~RequestProcessingPolicy();
    static RequestProcessingPolicy_ptr _duplicate( RequestProcessingPolicy_ptr obj );
    static RequestProcessingPolicy_ptr _narrow( CORBA::Object_ptr obj );
    static RequestProcessingPolicy_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

    virtual RequestProcessingPolicyValue value() = 0;
  protected:
    RequestProcessingPolicy() {};
  private:
    RequestProcessingPolicy( const RequestProcessingPolicy& );
    void operator=( const RequestProcessingPolicy& );
};


class POAManager;
typedef POAManager *POAManager_ptr;
typedef POAManager_ptr POAManagerRef;
typedef ObjVar<POAManager> POAManager_var;
typedef POAManager_var POAManager_out;


// Common definitions for interface POAManager
class POAManager : virtual public CORBA::Object
{
  public:
    virtual ~POAManager();
    static POAManager_ptr _duplicate( POAManager_ptr obj );
    static POAManager_ptr _narrow( CORBA::Object_ptr obj );
    static POAManager_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

    // begin-idl-hack
    // begin-mico-extension
    virtual void add_managed_poa (__POA_ptr) = 0;
    virtual void del_managed_poa (__POA_ptr) = 0;
    // end-mico-extension
    // end-idl-hack

    struct AdapterInactive : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      AdapterInactive();
      ~AdapterInactive();
      AdapterInactive( const AdapterInactive& s );
      AdapterInactive& operator=( const AdapterInactive& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      CORBA::Exception *_clone() const;
      static AdapterInactive *_downcast( CORBA::Exception *ex );
    };

    typedef ExceptVar<AdapterInactive> AdapterInactive_var;
    typedef AdapterInactive_var AdapterInactive_out;

    static CORBA::TypeCodeConst _tc_AdapterInactive;

    enum State {
      HOLDING = 0,
      ACTIVE,
      DISCARDING,
      INACTIVE
    };

    typedef State& State_out;

    static CORBA::TypeCodeConst _tc_State;

    virtual void activate() = 0;
    virtual void hold_requests( CORBA::Boolean wait_for_completion ) = 0;
    virtual void discard_requests( CORBA::Boolean wait_for_completion ) = 0;
    virtual void deactivate( CORBA::Boolean etherealize_objects, CORBA::Boolean wait_for_completion ) = 0;
    virtual State get_state() = 0;
  protected:
    POAManager() {};
  private:
    POAManager( const POAManager& );
    void operator=( const POAManager& );
};


class POA;
typedef POA *POA_ptr;
typedef POA_ptr POARef;
typedef ObjVar<POA> POA_var;
typedef POA_var POA_out;

class AdapterActivator;
typedef AdapterActivator *AdapterActivator_ptr;
typedef AdapterActivator_ptr AdapterActivatorRef;
typedef ObjVar<AdapterActivator> AdapterActivator_var;
typedef AdapterActivator_var AdapterActivator_out;


// Common definitions for interface AdapterActivator
class AdapterActivator : virtual public CORBA::Object
{
  public:
    virtual ~AdapterActivator();
    static AdapterActivator_ptr _duplicate( AdapterActivator_ptr obj );
    static AdapterActivator_ptr _narrow( CORBA::Object_ptr obj );
    static AdapterActivator_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

    virtual CORBA::Boolean unknown_adapter( POA_ptr parent, const char* name ) = 0;
  protected:
    AdapterActivator() {};
  private:
    AdapterActivator( const AdapterActivator& );
    void operator=( const AdapterActivator& );
};


class ServantManager;
typedef ServantManager *ServantManager_ptr;
typedef ServantManager_ptr ServantManagerRef;
typedef ObjVar<ServantManager> ServantManager_var;
typedef ServantManager_var ServantManager_out;


// Common definitions for interface ServantManager
class ServantManager : virtual public CORBA::Object
{
  public:
    virtual ~ServantManager();
    static ServantManager_ptr _duplicate( ServantManager_ptr obj );
    static ServantManager_ptr _narrow( CORBA::Object_ptr obj );
    static ServantManager_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

  protected:
    ServantManager() {};
  private:
    ServantManager( const ServantManager& );
    void operator=( const ServantManager& );
};


class ServantActivator;
typedef ServantActivator *ServantActivator_ptr;
typedef ServantActivator_ptr ServantActivatorRef;
typedef ObjVar<ServantActivator> ServantActivator_var;
typedef ServantActivator_var ServantActivator_out;


// Common definitions for interface ServantActivator
class ServantActivator : 
  virtual public ::PortableServer::ServantManager
{
  public:
    virtual ~ServantActivator();
    static ServantActivator_ptr _duplicate( ServantActivator_ptr obj );
    static ServantActivator_ptr _narrow( CORBA::Object_ptr obj );
    static ServantActivator_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

    virtual ::PortableServer::Servant incarnate( const ObjectId& oid, POA_ptr adapter ) = 0;
    virtual void etherealize( const ObjectId& oid, POA_ptr adapter, ::PortableServer::Servant serv, CORBA::Boolean cleanup_in_progress, CORBA::Boolean remaining_activations ) = 0;
  protected:
    ServantActivator() {};
  private:
    ServantActivator( const ServantActivator& );
    void operator=( const ServantActivator& );
};


class ServantLocator;
typedef ServantLocator *ServantLocator_ptr;
typedef ServantLocator_ptr ServantLocatorRef;
typedef ObjVar<ServantLocator> ServantLocator_var;
typedef ServantLocator_var ServantLocator_out;


// Common definitions for interface ServantLocator
class ServantLocator : 
  virtual public ::PortableServer::ServantManager
{
  public:
    virtual ~ServantLocator();
    static ServantLocator_ptr _duplicate( ServantLocator_ptr obj );
    static ServantLocator_ptr _narrow( CORBA::Object_ptr obj );
    static ServantLocator_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

    // begin-idl-hack
    typedef void * Cookie;
    // end-idl-hack

    typedef char* Identifier;
    typedef CORBA::String_var Identifier_var;
    typedef CORBA::String_out Identifier_out;

    virtual ::PortableServer::Servant preinvoke( const ObjectId& oid, POA_ptr adapter, const char* operation, Cookie& the_cookie ) = 0;
    virtual void postinvoke( const ObjectId& oid, POA_ptr adapter, const char* operation, Cookie the_cookie, ::PortableServer::Servant the_servant ) = 0;
  protected:
    ServantLocator() {};
  private:
    ServantLocator( const ServantLocator& );
    void operator=( const ServantLocator& );
};



// Common definitions for interface POA
class POA : virtual public CORBA::Object
{
  public:
    virtual ~POA();
    static POA_ptr _duplicate( POA_ptr obj );
    static POA_ptr _narrow( CORBA::Object_ptr obj );
    static POA_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

    // begin-idl-hack
    // begin-mico-extension
    static POA_ptr _the_root_poa;
    virtual CORBA::Object_ptr activate_for_this (PortableServer::Servant) = 0;
    virtual void poa_manager_callback (POAManager::State,
				       CORBA::Boolean,
				       CORBA::Boolean) = 0;

    virtual PortableServer::Servant preinvoke (CORBA::Object_ptr) = 0;
    virtual void postinvoke () = 0;
    // end-mico-extension
    // end-idl-hack

    struct AdapterAlreadyExists : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      AdapterAlreadyExists();
      ~AdapterAlreadyExists();
      AdapterAlreadyExists( const AdapterAlreadyExists& s );
      AdapterAlreadyExists& operator=( const AdapterAlreadyExists& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      CORBA::Exception *_clone() const;
      static AdapterAlreadyExists *_downcast( CORBA::Exception *ex );
    };

    typedef ExceptVar<AdapterAlreadyExists> AdapterAlreadyExists_var;
    typedef AdapterAlreadyExists_var AdapterAlreadyExists_out;

    static CORBA::TypeCodeConst _tc_AdapterAlreadyExists;

    struct AdapterInactive : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      AdapterInactive();
      ~AdapterInactive();
      AdapterInactive( const AdapterInactive& s );
      AdapterInactive& operator=( const AdapterInactive& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      CORBA::Exception *_clone() const;
      static AdapterInactive *_downcast( CORBA::Exception *ex );
    };

    typedef ExceptVar<AdapterInactive> AdapterInactive_var;
    typedef AdapterInactive_var AdapterInactive_out;

    static CORBA::TypeCodeConst _tc_AdapterInactive;

    struct AdapterNonExistent : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      AdapterNonExistent();
      ~AdapterNonExistent();
      AdapterNonExistent( const AdapterNonExistent& s );
      AdapterNonExistent& operator=( const AdapterNonExistent& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      CORBA::Exception *_clone() const;
      static AdapterNonExistent *_downcast( CORBA::Exception *ex );
    };

    typedef ExceptVar<AdapterNonExistent> AdapterNonExistent_var;
    typedef AdapterNonExistent_var AdapterNonExistent_out;

    static CORBA::TypeCodeConst _tc_AdapterNonExistent;

    struct InvalidPolicy : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      InvalidPolicy();
      ~InvalidPolicy();
      InvalidPolicy( const InvalidPolicy& s );
      InvalidPolicy& operator=( const InvalidPolicy& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      #ifndef HAVE_EXPLICIT_STRUCT_OPS
      InvalidPolicy();
      #endif //HAVE_EXPLICIT_STRUCT_OPS
      InvalidPolicy( CORBA::UShort _m0 );
      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      CORBA::Exception *_clone() const;
      static InvalidPolicy *_downcast( CORBA::Exception *ex );
      CORBA::UShort index;
    };

    typedef ExceptVar<InvalidPolicy> InvalidPolicy_var;
    typedef InvalidPolicy_var InvalidPolicy_out;

    static CORBA::TypeCodeConst _tc_InvalidPolicy;

    struct NoServant : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      NoServant();
      ~NoServant();
      NoServant( const NoServant& s );
      NoServant& operator=( const NoServant& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      CORBA::Exception *_clone() const;
      static NoServant *_downcast( CORBA::Exception *ex );
    };

    typedef ExceptVar<NoServant> NoServant_var;
    typedef NoServant_var NoServant_out;

    static CORBA::TypeCodeConst _tc_NoServant;

    struct ObjectAlreadyActive : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      ObjectAlreadyActive();
      ~ObjectAlreadyActive();
      ObjectAlreadyActive( const ObjectAlreadyActive& s );
      ObjectAlreadyActive& operator=( const ObjectAlreadyActive& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      CORBA::Exception *_clone() const;
      static ObjectAlreadyActive *_downcast( CORBA::Exception *ex );
    };

    typedef ExceptVar<ObjectAlreadyActive> ObjectAlreadyActive_var;
    typedef ObjectAlreadyActive_var ObjectAlreadyActive_out;

    static CORBA::TypeCodeConst _tc_ObjectAlreadyActive;

    struct ObjectNotActive : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      ObjectNotActive();
      ~ObjectNotActive();
      ObjectNotActive( const ObjectNotActive& s );
      ObjectNotActive& operator=( const ObjectNotActive& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      CORBA::Exception *_clone() const;
      static ObjectNotActive *_downcast( CORBA::Exception *ex );
    };

    typedef ExceptVar<ObjectNotActive> ObjectNotActive_var;
    typedef ObjectNotActive_var ObjectNotActive_out;

    static CORBA::TypeCodeConst _tc_ObjectNotActive;

    struct ServantAlreadyActive : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      ServantAlreadyActive();
      ~ServantAlreadyActive();
      ServantAlreadyActive( const ServantAlreadyActive& s );
      ServantAlreadyActive& operator=( const ServantAlreadyActive& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      CORBA::Exception *_clone() const;
      static ServantAlreadyActive *_downcast( CORBA::Exception *ex );
    };

    typedef ExceptVar<ServantAlreadyActive> ServantAlreadyActive_var;
    typedef ServantAlreadyActive_var ServantAlreadyActive_out;

    static CORBA::TypeCodeConst _tc_ServantAlreadyActive;

    struct ServantNotActive : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      ServantNotActive();
      ~ServantNotActive();
      ServantNotActive( const ServantNotActive& s );
      ServantNotActive& operator=( const ServantNotActive& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      CORBA::Exception *_clone() const;
      static ServantNotActive *_downcast( CORBA::Exception *ex );
    };

    typedef ExceptVar<ServantNotActive> ServantNotActive_var;
    typedef ServantNotActive_var ServantNotActive_out;

    static CORBA::TypeCodeConst _tc_ServantNotActive;

    struct WrongAdapter : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      WrongAdapter();
      ~WrongAdapter();
      WrongAdapter( const WrongAdapter& s );
      WrongAdapter& operator=( const WrongAdapter& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      CORBA::Exception *_clone() const;
      static WrongAdapter *_downcast( CORBA::Exception *ex );
    };

    typedef ExceptVar<WrongAdapter> WrongAdapter_var;
    typedef WrongAdapter_var WrongAdapter_out;

    static CORBA::TypeCodeConst _tc_WrongAdapter;

    struct WrongPolicy : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      WrongPolicy();
      ~WrongPolicy();
      WrongPolicy( const WrongPolicy& s );
      WrongPolicy& operator=( const WrongPolicy& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      CORBA::Exception *_clone() const;
      static WrongPolicy *_downcast( CORBA::Exception *ex );
    };

    typedef ExceptVar<WrongPolicy> WrongPolicy_var;
    typedef WrongPolicy_var WrongPolicy_out;

    static CORBA::TypeCodeConst _tc_WrongPolicy;

    typedef char* RepositoryId;
    typedef CORBA::String_var RepositoryId_var;
    typedef CORBA::String_out RepositoryId_out;

    virtual char* the_name() = 0;
    virtual ::PortableServer::POA_ptr the_parent() = 0;
    virtual POAManager_ptr the_POAManager() = 0;
    virtual AdapterActivator_ptr the_activator() = 0;
    virtual void the_activator( AdapterActivator_ptr value ) = 0;
    virtual ::PortableServer::POA_ptr create_POA( const char* adapter_name, POAManager_ptr a_POAManager, const CORBA::PolicyList& policies ) = 0;
    virtual ::PortableServer::POA_ptr find_POA( const char* adapter_name, CORBA::Boolean activate_it ) = 0;
    virtual void destroy( CORBA::Boolean etherealize_objects, CORBA::Boolean wait_for_completion ) = 0;
    virtual ThreadPolicy_ptr create_thread_policy( ThreadPolicyValue value ) = 0;
    virtual LifespanPolicy_ptr create_lifespan_policy( LifespanPolicyValue value ) = 0;
    virtual IdUniquenessPolicy_ptr create_id_uniqueness_policy( IdUniquenessPolicyValue value ) = 0;
    virtual IdAssignmentPolicy_ptr create_id_assignment_policy( IdAssignmentPolicyValue value ) = 0;
    virtual ImplicitActivationPolicy_ptr create_implicit_activation_policy( ImplicitActivationPolicyValue value ) = 0;
    virtual ServantRetentionPolicy_ptr create_servant_retention_policy( ServantRetentionPolicyValue value ) = 0;
    virtual RequestProcessingPolicy_ptr create_request_processing_policy( RequestProcessingPolicyValue value ) = 0;
    virtual ServantManager_ptr get_servant_manager() = 0;
    virtual void set_servant_manager( ServantManager_ptr imgr ) = 0;
    virtual Servant get_servant() = 0;
    virtual void set_servant( Servant p_servant ) = 0;
    virtual ObjectId* activate_object( Servant p_servant ) = 0;
    virtual void activate_object_with_id( const ObjectId& id, Servant p_servant ) = 0;
    virtual void deactivate_object( const ObjectId& oid ) = 0;
    virtual CORBA::Object_ptr create_reference( const char* intf ) = 0;
    virtual CORBA::Object_ptr create_reference_with_id( const ObjectId& oid, const char* intf ) = 0;
    virtual ObjectId* servant_to_id( Servant p_servant ) = 0;
    virtual CORBA::Object_ptr servant_to_reference( Servant p_servant ) = 0;
    virtual Servant reference_to_servant( CORBA::Object_ptr reference ) = 0;
    virtual ObjectId* reference_to_id( CORBA::Object_ptr reference ) = 0;
    virtual Servant id_to_servant( const ObjectId& oid ) = 0;
    virtual CORBA::Object_ptr id_to_reference( const ObjectId& oid ) = 0;
  protected:
    POA() {};
  private:
    POA( const POA& );
    void operator=( const POA& );
};


class Current;
typedef Current *Current_ptr;
typedef Current_ptr CurrentRef;
typedef ObjVar<Current> Current_var;
typedef Current_var Current_out;


// Common definitions for interface Current
class Current : 
  virtual public ::CORBA::Current
{
  public:
    virtual ~Current();
    static Current_ptr _duplicate( Current_ptr obj );
    static Current_ptr _narrow( CORBA::Object_ptr obj );
    static Current_ptr _nil();

    virtual void *_narrow_helper( const char *repoid );

    // begin-idl-hack
    // begin-mico-extension
    static Current_ptr _the_poa_current;
    virtual CORBA::Object_ptr make_ref () = 0;
    virtual CORBA::Boolean iscurrent () = 0;
    virtual PortableServer::Servant get_serv () = 0;
    // end-mico-extension
    // end-idl-hack

    struct NoContext : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      NoContext();
      ~NoContext();
      NoContext( const NoContext& s );
      NoContext& operator=( const NoContext& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      CORBA::Exception *_clone() const;
      static NoContext *_downcast( CORBA::Exception *ex );
    };

    typedef ExceptVar<NoContext> NoContext_var;
    typedef NoContext_var NoContext_out;

    static CORBA::TypeCodeConst _tc_NoContext;

    virtual POA_ptr get_POA() = 0;
    virtual ObjectId* get_object_id() = 0;
  protected:
    Current() {};
  private:
    Current( const Current& );
    void operator=( const Current& );
};


#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_PortableServer)

#ifndef MICO_NO_TOPLEVEL_MODULES

};
#endif



#ifndef MICO_CONF_NO_POA

#endif // MICO_CONF_NO_POA

#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE__GLOBAL)

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::ForwardRequest &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::ForwardRequest &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::ThreadPolicyValue &e );

CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::ThreadPolicyValue &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::LifespanPolicyValue &e );

CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::LifespanPolicyValue &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::IdUniquenessPolicyValue &e );

CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::IdUniquenessPolicyValue &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::IdAssignmentPolicyValue &e );

CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::IdAssignmentPolicyValue &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::ImplicitActivationPolicyValue &e );

CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::ImplicitActivationPolicyValue &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::ServantRetentionPolicyValue &e );

CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::ServantRetentionPolicyValue &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::RequestProcessingPolicyValue &e );

CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::RequestProcessingPolicyValue &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::POAManager::AdapterInactive &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::POAManager::AdapterInactive &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::POAManager::State &e );

CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::POAManager::State &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::POA::AdapterAlreadyExists &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::POA::AdapterAlreadyExists &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::POA::AdapterInactive &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::POA::AdapterInactive &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::POA::AdapterNonExistent &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::POA::AdapterNonExistent &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::POA::InvalidPolicy &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::POA::InvalidPolicy &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::POA::NoServant &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::POA::NoServant &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::POA::ObjectAlreadyActive &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::POA::ObjectAlreadyActive &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::POA::ObjectNotActive &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::POA::ObjectNotActive &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::POA::ServantAlreadyActive &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::POA::ServantAlreadyActive &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::POA::ServantNotActive &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::POA::ServantNotActive &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::POA::WrongAdapter &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::POA::WrongAdapter &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::POA::WrongPolicy &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::POA::WrongPolicy &e );

CORBA::Boolean operator<<=( CORBA::Any &a, const ::PortableServer::Current::NoContext &e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::PortableServer::Current::NoContext &e );

CORBA::Boolean operator<<=( CORBA::Any &_a, const SequenceTmpl<CORBA::Octet,MICO_TID_OCTET> &_s );
CORBA::Boolean operator>>=( const CORBA::Any &_a, SequenceTmpl<CORBA::Octet,MICO_TID_OCTET> &_s );

#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE__GLOBAL)


#if !defined(MICO_NO_TOPLEVEL_MODULES) && !defined(MICO_IN_GENERATED_CODE)
#include <mico/template_impl.h>
#endif


// begin-idl-hack
/*
 * By specification, AdapterActivators and ServantManagers are Servant
 * implementations, not pseudo objects, that must be activated like any
 * other servant. This requires special handling.
 * Actually, we don't *require* that these objects are explicitly
 * activated, but we support their activation.
 */

#ifndef MICO_NO_TOPLEVEL_MODULES
MICO_NAMESPACE_DECL POA_PortableServer {
#endif
class AdapterActivator :
  virtual public PortableServer::DynamicImplementation,
  virtual public PortableServer::AdapterActivator
{
public:
  virtual ~AdapterActivator ();
  PortableServer::AdapterActivator_ptr _this ();
  CORBA::Boolean _is_a (const char *);
  void invoke (CORBA::ServerRequest_ptr);
  CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &,
					  PortableServer::POA_ptr);

  void * _narrow_helper (const char *);
  static AdapterActivator * _narrow (CORBA::Object_ptr);
  static AdapterActivator * _narrow (PortableServer::Servant);
};

class ServantManager :
  virtual public PortableServer::DynamicImplementation,
  virtual public PortableServer::ServantManager
{
public:
  virtual ~ServantManager ();
  PortableServer::ServantManager_ptr _this ();
  CORBA::Boolean _is_a (const char *);
  void invoke (CORBA::ServerRequest_ptr);
  CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &,
					  PortableServer::POA_ptr);

  void * _narrow_helper (const char *);
  static ServantManager * _narrow (CORBA::Object_ptr);
  static ServantManager * _narrow (PortableServer::Servant);
};

class ServantActivator :
  virtual public ServantManager,
  virtual public PortableServer::ServantActivator
{
public:
  virtual ~ServantActivator ();
  PortableServer::ServantActivator_ptr _this ();
  CORBA::Boolean _is_a (const char *);
  void invoke (CORBA::ServerRequest_ptr);
  CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &,
					  PortableServer::POA_ptr);

  void * _narrow_helper (const char *);
  static ServantActivator * _narrow (CORBA::Object_ptr);
  static ServantActivator * _narrow (PortableServer::Servant);
};

class ServantLocator :
  virtual public ServantManager,
  virtual public PortableServer::ServantLocator
{
public:
  virtual ~ServantLocator ();
  PortableServer::ServantLocator_ptr _this ();
  CORBA::Boolean _is_a (const char *);
  void invoke (CORBA::ServerRequest_ptr);
  CORBA::RepositoryId _primary_interface (const PortableServer::ObjectId &,
					  PortableServer::POA_ptr);

  void * _narrow_helper (const char *);
  static ServantLocator * _narrow (CORBA::Object_ptr);
  static ServantLocator * _narrow (PortableServer::Servant);
};
#ifndef MICO_NO_TOPLEVEL_MODULES
};
#endif
// end-idl-hack

// begin-idl-hack
template<class T>
class POA_Tie_Base
{
protected:
  T * ptr;
  PortableServer::POA_ptr poa;
  CORBA::Boolean rel;

  POA_Tie_Base () {}

public:
  POA_Tie_Base (T *t, PortableServer::POA_ptr _poa, CORBA::Boolean _rel)
  {
    ptr = t;
    poa = PortableServer::POA::_duplicate (_poa);
    rel = _rel;
  }

  virtual ~POA_Tie_Base ()
  {
    if (rel) delete ptr;
    CORBA::release (poa);
  }

  T * _tied_object ()
  {
    return ptr;
  }
  
  void _tied_object (T &t)
  {
    if (rel) delete ptr;
    ptr = &t;
    rel = 0;
  }

  void _tied_object (T *t, CORBA::Boolean r = 1)
  {
    if (rel) delete ptr;
    ptr = t;
    rel = r;
  }

  CORBA::Boolean _is_owner ()
  {
    return rel;
  }

  void _is_owner (CORBA::Boolean _rel)
  {
    rel = _rel;
  }
};
// end-idl-hack

#endif

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Namespace bug?
  1999-02-17  1:21         ` Hans-Jörg Fischer
       [not found]           ` < 36CA8A12.E2FAB8D1@zkm.de >
@ 1999-02-28 22:53           ` Hans-Jörg Fischer
  1 sibling, 0 replies; 14+ messages in thread
From: Hans-Jörg Fischer @ 1999-02-28 22:53 UTC (permalink / raw)
  To: Martin v. Loewis; +Cc: egcs

Martin v. Loewis" wrote:

> The next time you report a bug, please take the time to read the bug
> reporting instructions in the manual or on the web page. The sources
> you send where not compilable; CORBA.h, mico/throw.h and other where
> missing.

I am sorry, I should habe read them first. However, the files you name
form part of the MICO distribution which is really complex. Therefore, I
decided not to include them in my eMail.

> However, I think I've found the problem, anyway: There is apparently
> no implementation of
 
> ODB::FS::FileServant::~FileServant();
 
> which is declared in the header file. If you implement that
> destructor, the virtual tables will get emitted.

Thank you, I guess this will fix it. In another thread, I read that this
is the behaviour of EGCS to build the vtable if and only if it has all
methods of the class present at compile-time (I can understand that, it
is _really_ hard to build fractions of a vtable). Is it correct
therefore that I cannot partition a class implementation into different
source files? Is this according to standard C++ specs?

Thank you!

Regards

Joerg Fischer

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Namespace bug?
  1999-02-08 11:04 ` Alexandre Oliva
  1999-02-08 11:15   ` Hans-Jörg Fischer
@ 1999-02-28 22:53   ` Alexandre Oliva
  1 sibling, 0 replies; 14+ messages in thread
From: Alexandre Oliva @ 1999-02-28 22:53 UTC (permalink / raw)
  To: Hans-Jörg Fischer; +Cc: egcs-common

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]

On Feb  8, 1999, Hans-Jörg Fischer <fischer@zkm.de> wrote:

> Obviously, the compiler gets confused with the base class and assumes it
> in the wrong namespace.

Unless you post some actual code, there's no way this is obvious.

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Namespace bug?
  1999-02-08 10:57 Hans-Jörg Fischer
  1999-02-08 11:04 ` Alexandre Oliva
@ 1999-02-28 22:53 ` Hans-Jörg Fischer
  1 sibling, 0 replies; 14+ messages in thread
From: Hans-Jörg Fischer @ 1999-02-28 22:53 UTC (permalink / raw)
  To: egcs-common

Hi!

The following problem occured during use of EGCS (latest snapshot):

Using multiple nested namespaces, the compiler looses track of the
virtual method tables. Here are some code fragments

...

namespace PortableServer {
...

class ServantBase {
....
};

class DynamicImplementation : public virtual ServantBase {
....
};

}; // namespace PortableServer

namespace ODB {

....

namespace FS {
....

class FileServant : public PortableServer::DynamicImplementation {
....
}; 
....
}; // namespace FS
....
}; // namespace ODB

Now, when I link the stuff above, I get

In function `ODB::FS::FileServant::FileServant(int,
ODB::FileSystemDataSource_impl *)':
undefined reference to
`ODB::FS::FileServant::PortableServer::ServantBase virtual table'

Obviously, the compiler gets confused with the base class and assumes it
in the wrong namespace.

Any suggestions?

Thanks!

Joerg

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Namespace bug?
  1999-02-14  1:48       ` Martin v. Loewis
  1999-02-17  1:21         ` Hans-Jörg Fischer
@ 1999-02-28 22:53         ` Martin v. Loewis
  1 sibling, 0 replies; 14+ messages in thread
From: Martin v. Loewis @ 1999-02-28 22:53 UTC (permalink / raw)
  To: fischer; +Cc: egcs

> Here you go...(the files base on the MICO distribution)

The next time you report a bug, please take the time to read the bug
reporting instructions in the manual or on the web page. The sources
you send where not compilable; CORBA.h, mico/throw.h and other where
missing.

However, I think I've found the problem, anyway: There is apparently
no implementation of

ODB::FS::FileServant::~FileServant();

which is declared in the header file. If you implement that
destructor, the virtual tables will get emitted.

Good luck,
Martin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Namespace bug?
  1999-02-17 15:15             ` Martin v. Loewis
@ 1999-02-28 22:53               ` Martin v. Loewis
  0 siblings, 0 replies; 14+ messages in thread
From: Martin v. Loewis @ 1999-02-28 22:53 UTC (permalink / raw)
  To: fischer; +Cc: egcs

> Thank you, I guess this will fix it. In another thread, I read that this
> is the behaviour of EGCS to build the vtable if and only if it has all
> methods of the class present at compile-time (I can understand that, it
> is _really_ hard to build fractions of a vtable).

You must have misread that: It doesn't need all of them, it needs a
specific one (of course, applications shouldn't rely on that). It can
quite happily create a vtable with missing functions: the linker will
then complain about the missing functions.

As Mike points out, the standard requires you to define all virtual
functions of a class if you create instances of it.

Regards,
Martin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Namespace bug?
       [not found]           ` < 36CA8A12.E2FAB8D1@zkm.de >
@ 1999-02-17 15:15             ` Martin v. Loewis
  1999-02-28 22:53               ` Martin v. Loewis
  0 siblings, 1 reply; 14+ messages in thread
From: Martin v. Loewis @ 1999-02-17 15:15 UTC (permalink / raw)
  To: fischer; +Cc: egcs

> Thank you, I guess this will fix it. In another thread, I read that this
> is the behaviour of EGCS to build the vtable if and only if it has all
> methods of the class present at compile-time (I can understand that, it
> is _really_ hard to build fractions of a vtable).

You must have misread that: It doesn't need all of them, it needs a
specific one (of course, applications shouldn't rely on that). It can
quite happily create a vtable with missing functions: the linker will
then complain about the missing functions.

As Mike points out, the standard requires you to define all virtual
functions of a class if you create instances of it.

Regards,
Martin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Namespace bug?
  1999-02-14  1:48       ` Martin v. Loewis
@ 1999-02-17  1:21         ` Hans-Jörg Fischer
       [not found]           ` < 36CA8A12.E2FAB8D1@zkm.de >
  1999-02-28 22:53           ` Hans-Jörg Fischer
  1999-02-28 22:53         ` Martin v. Loewis
  1 sibling, 2 replies; 14+ messages in thread
From: Hans-Jörg Fischer @ 1999-02-17  1:21 UTC (permalink / raw)
  To: Martin v. Loewis; +Cc: egcs

Martin v. Loewis" wrote:

> The next time you report a bug, please take the time to read the bug
> reporting instructions in the manual or on the web page. The sources
> you send where not compilable; CORBA.h, mico/throw.h and other where
> missing.

I am sorry, I should habe read them first. However, the files you name
form part of the MICO distribution which is really complex. Therefore, I
decided not to include them in my eMail.

> However, I think I've found the problem, anyway: There is apparently
> no implementation of
 
> ODB::FS::FileServant::~FileServant();
 
> which is declared in the header file. If you implement that
> destructor, the virtual tables will get emitted.

Thank you, I guess this will fix it. In another thread, I read that this
is the behaviour of EGCS to build the vtable if and only if it has all
methods of the class present at compile-time (I can understand that, it
is _really_ hard to build fractions of a vtable). Is it correct
therefore that I cannot partition a class implementation into different
source files? Is this according to standard C++ specs?

Thank you!

Regards

Joerg Fischer

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Namespace bug?
       [not found]     ` < 36BF37F8.497DEF55@zkm.de >
@ 1999-02-14  1:48       ` Martin v. Loewis
  1999-02-17  1:21         ` Hans-Jörg Fischer
  1999-02-28 22:53         ` Martin v. Loewis
  0 siblings, 2 replies; 14+ messages in thread
From: Martin v. Loewis @ 1999-02-14  1:48 UTC (permalink / raw)
  To: fischer; +Cc: egcs

> Here you go...(the files base on the MICO distribution)

The next time you report a bug, please take the time to read the bug
reporting instructions in the manual or on the web page. The sources
you send where not compilable; CORBA.h, mico/throw.h and other where
missing.

However, I think I've found the problem, anyway: There is apparently
no implementation of

ODB::FS::FileServant::~FileServant();

which is declared in the header file. If you implement that
destructor, the virtual tables will get emitted.

Good luck,
Martin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Namespace bug?
  1999-02-08 11:04 ` Alexandre Oliva
@ 1999-02-08 11:15   ` Hans-Jörg Fischer
       [not found]     ` < 36BF37F8.497DEF55@zkm.de >
  1999-02-28 22:53     ` Hans-Jörg Fischer
  1999-02-28 22:53   ` Alexandre Oliva
  1 sibling, 2 replies; 14+ messages in thread
From: Hans-Jörg Fischer @ 1999-02-08 11:15 UTC (permalink / raw)
  To: egcs-common

Alexandre Oliva wrote:

> > Obviously, the compiler gets confused with the base class and assumes it
> > in the wrong namespace.
> 
> Unless you post some actual code, there's no way this is obvious.

Here you go...(the files base on the MICO distribution)

Sincerely

Joerg Fischer
filesystemdatasource_impl.h
filesystemdatasource.h
filesystemdatasource_impl.cc
filesystemdatasource.cc
poa.h

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Namespace bug?
  1999-02-08 10:57 Hans-Jörg Fischer
@ 1999-02-08 11:04 ` Alexandre Oliva
  1999-02-08 11:15   ` Hans-Jörg Fischer
  1999-02-28 22:53   ` Alexandre Oliva
  1999-02-28 22:53 ` Hans-Jörg Fischer
  1 sibling, 2 replies; 14+ messages in thread
From: Alexandre Oliva @ 1999-02-08 11:04 UTC (permalink / raw)
  To: Hans-Jörg Fischer; +Cc: egcs-common

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

On Feb  8, 1999, Hans-Jörg Fischer <fischer@zkm.de> wrote:

> Obviously, the compiler gets confused with the base class and assumes it
> in the wrong namespace.

Unless you post some actual code, there's no way this is obvious.

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Namespace bug?
@ 1999-02-08 10:57 Hans-Jörg Fischer
  1999-02-08 11:04 ` Alexandre Oliva
  1999-02-28 22:53 ` Hans-Jörg Fischer
  0 siblings, 2 replies; 14+ messages in thread
From: Hans-Jörg Fischer @ 1999-02-08 10:57 UTC (permalink / raw)
  To: egcs-common

Hi!

The following problem occured during use of EGCS (latest snapshot):

Using multiple nested namespaces, the compiler looses track of the
virtual method tables. Here are some code fragments

...

namespace PortableServer {
...

class ServantBase {
....
};

class DynamicImplementation : public virtual ServantBase {
....
};

}; // namespace PortableServer

namespace ODB {

....

namespace FS {
....

class FileServant : public PortableServer::DynamicImplementation {
....
}; 
....
}; // namespace FS
....
}; // namespace ODB

Now, when I link the stuff above, I get

In function `ODB::FS::FileServant::FileServant(int,
ODB::FileSystemDataSource_impl *)':
undefined reference to
`ODB::FS::FileServant::PortableServer::ServantBase virtual table'

Obviously, the compiler gets confused with the base class and assumes it
in the wrong namespace.

Any suggestions?

Thanks!

Joerg

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~1999-02-28 22:53 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-17  1:38 Namespace bug? Mike Stump
1999-02-28 22:53 ` Mike Stump
  -- strict thread matches above, loose matches on Subject: below --
1999-02-08 10:57 Hans-Jörg Fischer
1999-02-08 11:04 ` Alexandre Oliva
1999-02-08 11:15   ` Hans-Jörg Fischer
     [not found]     ` < 36BF37F8.497DEF55@zkm.de >
1999-02-14  1:48       ` Martin v. Loewis
1999-02-17  1:21         ` Hans-Jörg Fischer
     [not found]           ` < 36CA8A12.E2FAB8D1@zkm.de >
1999-02-17 15:15             ` Martin v. Loewis
1999-02-28 22:53               ` Martin v. Loewis
1999-02-28 22:53           ` Hans-Jörg Fischer
1999-02-28 22:53         ` Martin v. Loewis
1999-02-28 22:53     ` Hans-Jörg Fischer
1999-02-28 22:53   ` Alexandre Oliva
1999-02-28 22:53 ` Hans-Jörg Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).