/*
 *  MICO --- an Open Source CORBA implementation
 *  Copyright (c) 1997-2003 by The Mico Team
 *
 *  This file was automatically generated. DO NOT EDIT!
 */

#include <CORBA.h>
#include <mico/throw.h>

#ifndef __COSEXTERNALIZATION_H__
#define __COSEXTERNALIZATION_H__






namespace CosStream
{

class StreamIO;
typedef StreamIO *StreamIO_ptr;
typedef StreamIO_ptr StreamIORef;
typedef ObjVar< StreamIO > StreamIO_var;
typedef ObjOut< StreamIO > StreamIO_out;

class Streamable;
typedef Streamable *Streamable_ptr;
typedef Streamable_ptr StreamableRef;
typedef ObjVar< Streamable > Streamable_var;
typedef ObjOut< Streamable > Streamable_out;

}


namespace CosCompoundExternalization
{

class Node;
typedef Node *Node_ptr;
typedef Node_ptr NodeRef;
typedef ObjVar< Node > Node_var;
typedef ObjOut< Node > Node_out;

class Relationship;
typedef Relationship *Relationship_ptr;
typedef Relationship_ptr RelationshipRef;
typedef ObjVar< Relationship > Relationship_var;
typedef ObjOut< Relationship > Relationship_out;

class Role;
typedef Role *Role_ptr;
typedef Role_ptr RoleRef;
typedef ObjVar< Role > Role_var;
typedef ObjOut< Role > Role_out;

class PropagationCriteriaFactory;
typedef PropagationCriteriaFactory *PropagationCriteriaFactory_ptr;
typedef PropagationCriteriaFactory_ptr PropagationCriteriaFactoryRef;
typedef ObjVar< PropagationCriteriaFactory > PropagationCriteriaFactory_var;
typedef ObjOut< PropagationCriteriaFactory > PropagationCriteriaFactory_out;

}


namespace CosStream
{

class StreamableFactory;
typedef StreamableFactory *StreamableFactory_ptr;
typedef StreamableFactory_ptr StreamableFactoryRef;
typedef ObjVar< StreamableFactory > StreamableFactory_var;
typedef ObjOut< StreamableFactory > StreamableFactory_out;

}


namespace CosCompoundExternalization
{

class NodeStreamableFactory;
typedef NodeStreamableFactory *NodeStreamableFactory_ptr;
typedef NodeStreamableFactory_ptr NodeStreamableFactoryRef;
typedef ObjVar< NodeStreamableFactory > NodeStreamableFactory_var;
typedef ObjOut< NodeStreamableFactory > NodeStreamableFactory_out;

}


namespace CosStream
{

}


namespace CosExternalization
{

class Stream;
typedef Stream *Stream_ptr;
typedef Stream_ptr StreamRef;
typedef ObjVar< Stream > Stream_var;
typedef ObjOut< Stream > Stream_out;

class StreamFactory;
typedef StreamFactory *StreamFactory_ptr;
typedef StreamFactory_ptr StreamFactoryRef;
typedef ObjVar< StreamFactory > StreamFactory_var;
typedef ObjOut< StreamFactory > StreamFactory_out;

class FileStreamFactory;
typedef FileStreamFactory *FileStreamFactory_ptr;
typedef FileStreamFactory_ptr FileStreamFactoryRef;
typedef ObjVar< FileStreamFactory > FileStreamFactory_var;
typedef ObjOut< FileStreamFactory > FileStreamFactory_out;

}



#include <coss/CosNaming.h>
#include <coss/CosLifeCycle.h>
#include <coss/CosObjectIdentity.h>
#include <mico/ir_base.h>
#include <mico/ir.h>
#include <coss/CosRelationships.h>
#include <coss/CosGraphs.h>



namespace CosStream
{

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


  #ifdef HAVE_STD_EH
  ObjectCreationError *operator->() { return this; }
  ObjectCreationError& operator*() { return *this; }
  operator ObjectCreationError*() { return this; }
  #endif // HAVE_STD_EH

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

#ifdef HAVE_STD_EH
typedef ObjectCreationError ObjectCreationError_catch;
#else
typedef ExceptVar< ObjectCreationError > ObjectCreationError_var;
typedef TVarOut< ObjectCreationError > ObjectCreationError_out;
typedef ObjectCreationError_var ObjectCreationError_catch;
#endif // HAVE_STD_EH

extern CORBA::TypeCodeConst _tc_ObjectCreationError;

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


  #ifdef HAVE_STD_EH
  StreamDataFormatError *operator->() { return this; }
  StreamDataFormatError& operator*() { return *this; }
  operator StreamDataFormatError*() { return this; }
  #endif // HAVE_STD_EH

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

#ifdef HAVE_STD_EH
typedef StreamDataFormatError StreamDataFormatError_catch;
#else
typedef ExceptVar< StreamDataFormatError > StreamDataFormatError_var;
typedef TVarOut< StreamDataFormatError > StreamDataFormatError_out;
typedef StreamDataFormatError_var StreamDataFormatError_catch;
#endif // HAVE_STD_EH

extern CORBA::TypeCodeConst _tc_StreamDataFormatError;


/*
 * Base class and common definitions for interface Streamable
 */

class Streamable : 
  virtual public ::CosObjectIdentity::IdentifiableObject
{
  public:
    virtual ~Streamable();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef Streamable_ptr _ptr_type;
    typedef Streamable_var _var_type;
    #endif

    static Streamable_ptr _narrow( CORBA::Object_ptr obj );
    static Streamable_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static Streamable_ptr _duplicate( Streamable_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static Streamable_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual ::CosLifeCycle::Key* external_form_id() = 0;

    virtual void externalize_to_stream( StreamIO_ptr targetStreamIO ) = 0;
    virtual void internalize_from_stream( StreamIO_ptr sourceStreamIO, ::CosLifeCycle::FactoryFinder_ptr there ) = 0;

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

extern CORBA::TypeCodeConst _tc_Streamable;

// Stub for interface Streamable
class Streamable_stub:
  virtual public Streamable,
  virtual public ::CosObjectIdentity::IdentifiableObject_stub
{
  public:
    virtual ~Streamable_stub();
    ::CosLifeCycle::Key* external_form_id();

    void externalize_to_stream( StreamIO_ptr targetStreamIO );
    void internalize_from_stream( StreamIO_ptr sourceStreamIO, ::CosLifeCycle::FactoryFinder_ptr there );

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

#ifndef MICO_CONF_NO_POA

class Streamable_stub_clp :
  virtual public Streamable_stub,
  virtual public ::CosObjectIdentity::IdentifiableObject_stub_clp
{
  public:
    Streamable_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~Streamable_stub_clp ();
    ::CosLifeCycle::Key* external_form_id();

    void externalize_to_stream( StreamIO_ptr targetStreamIO );
    void internalize_from_stream( StreamIO_ptr sourceStreamIO, ::CosLifeCycle::FactoryFinder_ptr there );

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

#endif // MICO_CONF_NO_POA

}


namespace CosCompoundExternalization
{


/*
 * Base class and common definitions for interface Node
 */

class Node : 
  virtual public ::CosGraphs::Node,
  virtual public ::CosStream::Streamable
{
  public:
    virtual ~Node();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef Node_ptr _ptr_type;
    typedef Node_var _var_type;
    #endif

    static Node_ptr _narrow( CORBA::Object_ptr obj );
    static Node_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static Node_ptr _duplicate( Node_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static Node_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual void externalize_node( ::CosStream::StreamIO_ptr sio ) = 0;
    virtual void internalize_node( ::CosStream::StreamIO_ptr sio, ::CosLifeCycle::FactoryFinder_ptr there, ::CosGraphs::Node::Roles_out rolesOfNode ) = 0;

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

extern CORBA::TypeCodeConst _tc_Node;

// Stub for interface Node
class Node_stub:
  virtual public Node,
  virtual public ::CosGraphs::Node_stub,
  virtual public ::CosStream::Streamable_stub
{
  public:
    virtual ~Node_stub();
    void externalize_node( ::CosStream::StreamIO_ptr sio );
    void internalize_node( ::CosStream::StreamIO_ptr sio, ::CosLifeCycle::FactoryFinder_ptr there, ::CosGraphs::Node::Roles_out rolesOfNode );

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

#ifndef MICO_CONF_NO_POA

class Node_stub_clp :
  virtual public Node_stub,
  virtual public ::CosGraphs::Node_stub_clp,
  virtual public ::CosStream::Streamable_stub_clp
{
  public:
    Node_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~Node_stub_clp ();
    void externalize_node( ::CosStream::StreamIO_ptr sio );
    void internalize_node( ::CosStream::StreamIO_ptr sio, ::CosLifeCycle::FactoryFinder_ptr there, ::CosGraphs::Node::Roles_out rolesOfNode );

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

#endif // MICO_CONF_NO_POA

struct RelationshipHandle;
typedef TVarVar< RelationshipHandle > RelationshipHandle_var;
typedef TVarOut< RelationshipHandle > RelationshipHandle_out;


struct RelationshipHandle {
  #ifdef HAVE_TYPEDEF_OVERLOAD
  typedef RelationshipHandle_var _var_type;
  #endif
  #ifdef HAVE_EXPLICIT_STRUCT_OPS
  RelationshipHandle();
  ~RelationshipHandle();
  RelationshipHandle( const RelationshipHandle& s );
  RelationshipHandle& operator=( const RelationshipHandle& s );
  #endif //HAVE_EXPLICIT_STRUCT_OPS

  Relationship_var theRelationship;
  ::CosObjectIdentity::ObjectIdentifier constantRandomId;
};

extern CORBA::TypeCodeConst _tc_RelationshipHandle;


/*
 * Base class and common definitions for interface Role
 */

class Role : 
  virtual public ::CosGraphs::Role
{
  public:
    virtual ~Role();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef Role_ptr _ptr_type;
    typedef Role_var _var_type;
    #endif

    static Role_ptr _narrow( CORBA::Object_ptr obj );
    static Role_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static Role_ptr _duplicate( Role_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static Role_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual void externalize_role( ::CosStream::StreamIO_ptr sio ) = 0;
    virtual void internalize_role( ::CosStream::StreamIO_ptr sio ) = 0;
    virtual ::CosGraphs::PropagationValue externalize_propagation( const RelationshipHandle& rel, const char* toRoleName, CORBA::Boolean_out sameForAll ) = 0;

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

extern CORBA::TypeCodeConst _tc_Role;

// Stub for interface Role
class Role_stub:
  virtual public Role,
  virtual public ::CosGraphs::Role_stub
{
  public:
    virtual ~Role_stub();
    void externalize_role( ::CosStream::StreamIO_ptr sio );
    void internalize_role( ::CosStream::StreamIO_ptr sio );
    ::CosGraphs::PropagationValue externalize_propagation( const RelationshipHandle& rel, const char* toRoleName, CORBA::Boolean_out sameForAll );

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

#ifndef MICO_CONF_NO_POA

class Role_stub_clp :
  virtual public Role_stub,
  virtual public ::CosGraphs::Role_stub_clp
{
  public:
    Role_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~Role_stub_clp ();
    void externalize_role( ::CosStream::StreamIO_ptr sio );
    void internalize_role( ::CosStream::StreamIO_ptr sio );
    ::CosGraphs::PropagationValue externalize_propagation( const RelationshipHandle& rel, const char* toRoleName, CORBA::Boolean_out sameForAll );

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

#endif // MICO_CONF_NO_POA


/*
 * Base class and common definitions for interface Relationship
 */

class Relationship : 
  virtual public ::CosRelationships::Relationship
{
  public:
    virtual ~Relationship();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef Relationship_ptr _ptr_type;
    typedef Relationship_var _var_type;
    #endif

    static Relationship_ptr _narrow( CORBA::Object_ptr obj );
    static Relationship_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static Relationship_ptr _duplicate( Relationship_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static Relationship_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual void externalize_relationship( ::CosStream::StreamIO_ptr sio ) = 0;
    virtual void internalize_relationship( ::CosStream::StreamIO_ptr sio, const ::CosGraphs::NamedRoles& newRoles ) = 0;
    virtual ::CosGraphs::PropagationValue externalize_propagation( const char* fromRoleName, const char* toRoleName, CORBA::Boolean_out sameForAll ) = 0;

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

extern CORBA::TypeCodeConst _tc_Relationship;

// Stub for interface Relationship
class Relationship_stub:
  virtual public Relationship,
  virtual public ::CosRelationships::Relationship_stub
{
  public:
    virtual ~Relationship_stub();
    void externalize_relationship( ::CosStream::StreamIO_ptr sio );
    void internalize_relationship( ::CosStream::StreamIO_ptr sio, const ::CosGraphs::NamedRoles& newRoles );
    ::CosGraphs::PropagationValue externalize_propagation( const char* fromRoleName, const char* toRoleName, CORBA::Boolean_out sameForAll );

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

#ifndef MICO_CONF_NO_POA

class Relationship_stub_clp :
  virtual public Relationship_stub,
  virtual public ::CosRelationships::Relationship_stub_clp
{
  public:
    Relationship_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~Relationship_stub_clp ();
    void externalize_relationship( ::CosStream::StreamIO_ptr sio );
    void internalize_relationship( ::CosStream::StreamIO_ptr sio, const ::CosGraphs::NamedRoles& newRoles );
    ::CosGraphs::PropagationValue externalize_propagation( const char* fromRoleName, const char* toRoleName, CORBA::Boolean_out sameForAll );

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

#endif // MICO_CONF_NO_POA


/*
 * Base class and common definitions for interface PropagationCriteriaFactory
 */

class PropagationCriteriaFactory : 
  virtual public CORBA::Object
{
  public:
    virtual ~PropagationCriteriaFactory();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef PropagationCriteriaFactory_ptr _ptr_type;
    typedef PropagationCriteriaFactory_var _var_type;
    #endif

    static PropagationCriteriaFactory_ptr _narrow( CORBA::Object_ptr obj );
    static PropagationCriteriaFactory_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static PropagationCriteriaFactory_ptr _duplicate( PropagationCriteriaFactory_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static PropagationCriteriaFactory_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual ::CosGraphs::TraversalCriteria_ptr create_for_externalize() = 0;

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

extern CORBA::TypeCodeConst _tc_PropagationCriteriaFactory;

// Stub for interface PropagationCriteriaFactory
class PropagationCriteriaFactory_stub:
  virtual public PropagationCriteriaFactory
{
  public:
    virtual ~PropagationCriteriaFactory_stub();
    ::CosGraphs::TraversalCriteria_ptr create_for_externalize();

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

#ifndef MICO_CONF_NO_POA

class PropagationCriteriaFactory_stub_clp :
  virtual public PropagationCriteriaFactory_stub,
  virtual public PortableServer::StubBase
{
  public:
    PropagationCriteriaFactory_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~PropagationCriteriaFactory_stub_clp ();
    ::CosGraphs::TraversalCriteria_ptr create_for_externalize();

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

#endif // MICO_CONF_NO_POA

}


namespace CosStream
{


/*
 * Base class and common definitions for interface StreamableFactory
 */

class StreamableFactory : 
  virtual public CORBA::Object
{
  public:
    virtual ~StreamableFactory();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef StreamableFactory_ptr _ptr_type;
    typedef StreamableFactory_var _var_type;
    #endif

    static StreamableFactory_ptr _narrow( CORBA::Object_ptr obj );
    static StreamableFactory_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static StreamableFactory_ptr _duplicate( StreamableFactory_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static StreamableFactory_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual Streamable_ptr create_uninitialized() = 0;

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

extern CORBA::TypeCodeConst _tc_StreamableFactory;

// Stub for interface StreamableFactory
class StreamableFactory_stub:
  virtual public StreamableFactory
{
  public:
    virtual ~StreamableFactory_stub();
    Streamable_ptr create_uninitialized();

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

#ifndef MICO_CONF_NO_POA

class StreamableFactory_stub_clp :
  virtual public StreamableFactory_stub,
  virtual public PortableServer::StubBase
{
  public:
    StreamableFactory_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~StreamableFactory_stub_clp ();
    Streamable_ptr create_uninitialized();

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

#endif // MICO_CONF_NO_POA

}


namespace CosCompoundExternalization
{


/*
 * Base class and common definitions for interface NodeStreamableFactory
 */

class NodeStreamableFactory : 
  virtual public ::CosStream::StreamableFactory,
  virtual public ::CosGraphs::NodeFactory
{
  public:
    virtual ~NodeStreamableFactory();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef NodeStreamableFactory_ptr _ptr_type;
    typedef NodeStreamableFactory_var _var_type;
    #endif

    static NodeStreamableFactory_ptr _narrow( CORBA::Object_ptr obj );
    static NodeStreamableFactory_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static NodeStreamableFactory_ptr _duplicate( NodeStreamableFactory_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static NodeStreamableFactory_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

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

extern CORBA::TypeCodeConst _tc_NodeStreamableFactory;

// Stub for interface NodeStreamableFactory
class NodeStreamableFactory_stub:
  virtual public NodeStreamableFactory,
  virtual public ::CosStream::StreamableFactory_stub,
  virtual public ::CosGraphs::NodeFactory_stub
{
  public:
    virtual ~NodeStreamableFactory_stub();
  private:
    void operator=( const NodeStreamableFactory_stub& );
};

#ifndef MICO_CONF_NO_POA

class NodeStreamableFactory_stub_clp :
  virtual public NodeStreamableFactory_stub,
  virtual public ::CosStream::StreamableFactory_stub_clp,
  virtual public ::CosGraphs::NodeFactory_stub_clp
{
  public:
    NodeStreamableFactory_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~NodeStreamableFactory_stub_clp ();
  protected:
    NodeStreamableFactory_stub_clp ();
  private:
    void operator=( const NodeStreamableFactory_stub_clp & );
};

#endif // MICO_CONF_NO_POA

}


namespace CosStream
{


/*
 * Base class and common definitions for interface StreamIO
 */

class StreamIO : 
  virtual public CORBA::Object
{
  public:
    virtual ~StreamIO();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef StreamIO_ptr _ptr_type;
    typedef StreamIO_var _var_type;
    #endif

    static StreamIO_ptr _narrow( CORBA::Object_ptr obj );
    static StreamIO_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static StreamIO_ptr _duplicate( StreamIO_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static StreamIO_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual void write_string( const char* aString ) = 0;
    virtual void write_char( CORBA::Char aChar ) = 0;
    virtual void write_octet( CORBA::Octet anOctet ) = 0;
    virtual void write_unsigned_long( CORBA::ULong anUnsignedLong ) = 0;
    virtual void write_unsigned_short( CORBA::UShort anUnsignedShort ) = 0;
    virtual void write_long( CORBA::Long aLong ) = 0;
    virtual void write_short( CORBA::Short aShort ) = 0;
    virtual void write_float( CORBA::Float aFloat ) = 0;
    virtual void write_double( CORBA::Double aDouble ) = 0;
    virtual void write_boolean( CORBA::Boolean aBoolean ) = 0;
    virtual void write_object( Streamable_ptr aStreamable ) = 0;
    virtual void write_graph( ::CosCompoundExternalization::Node_ptr starting_node ) = 0;
    virtual void write_long_long( CORBA::LongLong val ) = 0;
    virtual void write_unsigned_long_long( CORBA::ULongLong val ) = 0;
    virtual void write_long_double( CORBA::LongDouble val ) = 0;
    virtual void write_fixed( const CORBA::Any& val, CORBA::Short s ) = 0;
    virtual char* read_string() = 0;
    virtual CORBA::Char read_char() = 0;
    virtual CORBA::Octet read_octet() = 0;
    virtual CORBA::ULong read_unsigned_long() = 0;
    virtual CORBA::UShort read_unsigned_short() = 0;
    virtual CORBA::Long read_long() = 0;
    virtual CORBA::Short read_short() = 0;
    virtual CORBA::Float read_float() = 0;
    virtual CORBA::Double read_double() = 0;
    virtual CORBA::Boolean read_boolean() = 0;
    virtual Streamable_ptr read_object( ::CosLifeCycle::FactoryFinder_ptr there, Streamable_ptr aStreamable ) = 0;
    virtual void read_graph( ::CosCompoundExternalization::Node_ptr starting_node, ::CosLifeCycle::FactoryFinder_ptr there ) = 0;
    virtual CORBA::LongLong read_long_long() = 0;
    virtual CORBA::ULongLong read_unsigned_long_long() = 0;
    virtual CORBA::LongDouble read_long_double() = 0;
    virtual CORBA::Any* read_fixed() = 0;

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

extern CORBA::TypeCodeConst _tc_StreamIO;

// Stub for interface StreamIO
class StreamIO_stub:
  virtual public StreamIO
{
  public:
    virtual ~StreamIO_stub();
    void write_string( const char* aString );
    void write_char( CORBA::Char aChar );
    void write_octet( CORBA::Octet anOctet );
    void write_unsigned_long( CORBA::ULong anUnsignedLong );
    void write_unsigned_short( CORBA::UShort anUnsignedShort );
    void write_long( CORBA::Long aLong );
    void write_short( CORBA::Short aShort );
    void write_float( CORBA::Float aFloat );
    void write_double( CORBA::Double aDouble );
    void write_boolean( CORBA::Boolean aBoolean );
    void write_object( Streamable_ptr aStreamable );
    void write_graph( ::CosCompoundExternalization::Node_ptr starting_node );
    void write_long_long( CORBA::LongLong val );
    void write_unsigned_long_long( CORBA::ULongLong val );
    void write_long_double( CORBA::LongDouble val );
    void write_fixed( const CORBA::Any& val, CORBA::Short s );
    char* read_string();
    CORBA::Char read_char();
    CORBA::Octet read_octet();
    CORBA::ULong read_unsigned_long();
    CORBA::UShort read_unsigned_short();
    CORBA::Long read_long();
    CORBA::Short read_short();
    CORBA::Float read_float();
    CORBA::Double read_double();
    CORBA::Boolean read_boolean();
    Streamable_ptr read_object( ::CosLifeCycle::FactoryFinder_ptr there, Streamable_ptr aStreamable );
    void read_graph( ::CosCompoundExternalization::Node_ptr starting_node, ::CosLifeCycle::FactoryFinder_ptr there );
    CORBA::LongLong read_long_long();
    CORBA::ULongLong read_unsigned_long_long();
    CORBA::LongDouble read_long_double();
    CORBA::Any* read_fixed();

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

#ifndef MICO_CONF_NO_POA

class StreamIO_stub_clp :
  virtual public StreamIO_stub,
  virtual public PortableServer::StubBase
{
  public:
    StreamIO_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~StreamIO_stub_clp ();
    void write_string( const char* aString );
    void write_char( CORBA::Char aChar );
    void write_octet( CORBA::Octet anOctet );
    void write_unsigned_long( CORBA::ULong anUnsignedLong );
    void write_unsigned_short( CORBA::UShort anUnsignedShort );
    void write_long( CORBA::Long aLong );
    void write_short( CORBA::Short aShort );
    void write_float( CORBA::Float aFloat );
    void write_double( CORBA::Double aDouble );
    void write_boolean( CORBA::Boolean aBoolean );
    void write_object( Streamable_ptr aStreamable );
    void write_graph( ::CosCompoundExternalization::Node_ptr starting_node );
    void write_long_long( CORBA::LongLong val );
    void write_unsigned_long_long( CORBA::ULongLong val );
    void write_long_double( CORBA::LongDouble val );
    void write_fixed( const CORBA::Any& val, CORBA::Short s );
    char* read_string();
    CORBA::Char read_char();
    CORBA::Octet read_octet();
    CORBA::ULong read_unsigned_long();
    CORBA::UShort read_unsigned_short();
    CORBA::Long read_long();
    CORBA::Short read_short();
    CORBA::Float read_float();
    CORBA::Double read_double();
    CORBA::Boolean read_boolean();
    Streamable_ptr read_object( ::CosLifeCycle::FactoryFinder_ptr there, Streamable_ptr aStreamable );
    void read_graph( ::CosCompoundExternalization::Node_ptr starting_node, ::CosLifeCycle::FactoryFinder_ptr there );
    CORBA::LongLong read_long_long();
    CORBA::ULongLong read_unsigned_long_long();
    CORBA::LongDouble read_long_double();
    CORBA::Any* read_fixed();

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

#endif // MICO_CONF_NO_POA

}


namespace CosExternalization
{

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


  #ifdef HAVE_STD_EH
  InvalidFileNameError *operator->() { return this; }
  InvalidFileNameError& operator*() { return *this; }
  operator InvalidFileNameError*() { return this; }
  #endif // HAVE_STD_EH

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

#ifdef HAVE_STD_EH
typedef InvalidFileNameError InvalidFileNameError_catch;
#else
typedef ExceptVar< InvalidFileNameError > InvalidFileNameError_var;
typedef TVarOut< InvalidFileNameError > InvalidFileNameError_out;
typedef InvalidFileNameError_var InvalidFileNameError_catch;
#endif // HAVE_STD_EH

extern CORBA::TypeCodeConst _tc_InvalidFileNameError;

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


  #ifdef HAVE_STD_EH
  ContextAlreadyRegistered *operator->() { return this; }
  ContextAlreadyRegistered& operator*() { return *this; }
  operator ContextAlreadyRegistered*() { return this; }
  #endif // HAVE_STD_EH

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

#ifdef HAVE_STD_EH
typedef ContextAlreadyRegistered ContextAlreadyRegistered_catch;
#else
typedef ExceptVar< ContextAlreadyRegistered > ContextAlreadyRegistered_var;
typedef TVarOut< ContextAlreadyRegistered > ContextAlreadyRegistered_out;
typedef ContextAlreadyRegistered_var ContextAlreadyRegistered_catch;
#endif // HAVE_STD_EH

extern CORBA::TypeCodeConst _tc_ContextAlreadyRegistered;


/*
 * Base class and common definitions for interface Stream
 */

class Stream : 
  virtual public ::CosLifeCycle::LifeCycleObject
{
  public:
    virtual ~Stream();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef Stream_ptr _ptr_type;
    typedef Stream_var _var_type;
    #endif

    static Stream_ptr _narrow( CORBA::Object_ptr obj );
    static Stream_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static Stream_ptr _duplicate( Stream_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static Stream_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual void externalize( ::CosStream::Streamable_ptr theObject ) = 0;
    virtual ::CosStream::Streamable_ptr internalize( ::CosLifeCycle::FactoryFinder_ptr there ) = 0;
    virtual void begin_context() = 0;
    virtual void end_context() = 0;
    virtual void flush() = 0;

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

extern CORBA::TypeCodeConst _tc_Stream;

// Stub for interface Stream
class Stream_stub:
  virtual public Stream,
  virtual public ::CosLifeCycle::LifeCycleObject_stub
{
  public:
    virtual ~Stream_stub();
    void externalize( ::CosStream::Streamable_ptr theObject );
    ::CosStream::Streamable_ptr internalize( ::CosLifeCycle::FactoryFinder_ptr there );
    void begin_context();
    void end_context();
    void flush();

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

#ifndef MICO_CONF_NO_POA

class Stream_stub_clp :
  virtual public Stream_stub,
  virtual public ::CosLifeCycle::LifeCycleObject_stub_clp
{
  public:
    Stream_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~Stream_stub_clp ();
    void externalize( ::CosStream::Streamable_ptr theObject );
    ::CosStream::Streamable_ptr internalize( ::CosLifeCycle::FactoryFinder_ptr there );
    void begin_context();
    void end_context();
    void flush();

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

#endif // MICO_CONF_NO_POA


/*
 * Base class and common definitions for interface StreamFactory
 */

class StreamFactory : 
  virtual public CORBA::Object
{
  public:
    virtual ~StreamFactory();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef StreamFactory_ptr _ptr_type;
    typedef StreamFactory_var _var_type;
    #endif

    static StreamFactory_ptr _narrow( CORBA::Object_ptr obj );
    static StreamFactory_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static StreamFactory_ptr _duplicate( StreamFactory_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static StreamFactory_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual Stream_ptr create() = 0;

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

extern CORBA::TypeCodeConst _tc_StreamFactory;

// Stub for interface StreamFactory
class StreamFactory_stub:
  virtual public StreamFactory
{
  public:
    virtual ~StreamFactory_stub();
    Stream_ptr create();

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

#ifndef MICO_CONF_NO_POA

class StreamFactory_stub_clp :
  virtual public StreamFactory_stub,
  virtual public PortableServer::StubBase
{
  public:
    StreamFactory_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~StreamFactory_stub_clp ();
    Stream_ptr create();

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

#endif // MICO_CONF_NO_POA


/*
 * Base class and common definitions for interface FileStreamFactory
 */

class FileStreamFactory : 
  virtual public CORBA::Object
{
  public:
    virtual ~FileStreamFactory();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef FileStreamFactory_ptr _ptr_type;
    typedef FileStreamFactory_var _var_type;
    #endif

    static FileStreamFactory_ptr _narrow( CORBA::Object_ptr obj );
    static FileStreamFactory_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static FileStreamFactory_ptr _duplicate( FileStreamFactory_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static FileStreamFactory_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual Stream_ptr create( const char* theFileName ) = 0;

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

extern CORBA::TypeCodeConst _tc_FileStreamFactory;

// Stub for interface FileStreamFactory
class FileStreamFactory_stub:
  virtual public FileStreamFactory
{
  public:
    virtual ~FileStreamFactory_stub();
    Stream_ptr create( const char* theFileName );

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

#ifndef MICO_CONF_NO_POA

class FileStreamFactory_stub_clp :
  virtual public FileStreamFactory_stub,
  virtual public PortableServer::StubBase
{
  public:
    FileStreamFactory_stub_clp (PortableServer::POA_ptr, CORBA::Object_ptr);
    virtual ~FileStreamFactory_stub_clp ();
    Stream_ptr create( const char* theFileName );

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

#endif // MICO_CONF_NO_POA

}


#ifndef MICO_CONF_NO_POA



namespace POA_CosStream
{

class Streamable : 
  virtual public POA_CosObjectIdentity::IdentifiableObject
{
  public:
    virtual ~Streamable ();
    CosStream::Streamable_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 Streamable * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual ::CosLifeCycle::Key* external_form_id() = 0;

    virtual void externalize_to_stream( ::CosStream::StreamIO_ptr targetStreamIO ) = 0;
    virtual void internalize_from_stream( ::CosStream::StreamIO_ptr sourceStreamIO, ::CosLifeCycle::FactoryFinder_ptr there ) = 0;

  protected:
    Streamable () {};

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

}


namespace POA_CosCompoundExternalization
{

class Node : 
  virtual public POA_CosGraphs::Node,
  virtual public POA_CosStream::Streamable
{
  public:
    virtual ~Node ();
    CosCompoundExternalization::Node_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 Node * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual void externalize_node( ::CosStream::StreamIO_ptr sio ) = 0;
    virtual void internalize_node( ::CosStream::StreamIO_ptr sio, ::CosLifeCycle::FactoryFinder_ptr there, ::CosGraphs::Node::Roles_out rolesOfNode ) = 0;

  protected:
    Node () {};

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

class Role : 
  virtual public POA_CosGraphs::Role
{
  public:
    virtual ~Role ();
    CosCompoundExternalization::Role_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 Role * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual void externalize_role( ::CosStream::StreamIO_ptr sio ) = 0;
    virtual void internalize_role( ::CosStream::StreamIO_ptr sio ) = 0;
    virtual ::CosGraphs::PropagationValue externalize_propagation( const ::CosCompoundExternalization::RelationshipHandle& rel, const char* toRoleName, CORBA::Boolean_out sameForAll ) = 0;

  protected:
    Role () {};

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

class Relationship : 
  virtual public POA_CosRelationships::Relationship
{
  public:
    virtual ~Relationship ();
    CosCompoundExternalization::Relationship_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 Relationship * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual void externalize_relationship( ::CosStream::StreamIO_ptr sio ) = 0;
    virtual void internalize_relationship( ::CosStream::StreamIO_ptr sio, const ::CosGraphs::NamedRoles& newRoles ) = 0;
    virtual ::CosGraphs::PropagationValue externalize_propagation( const char* fromRoleName, const char* toRoleName, CORBA::Boolean_out sameForAll ) = 0;

  protected:
    Relationship () {};

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

class PropagationCriteriaFactory : virtual public PortableServer::StaticImplementation
{
  public:
    virtual ~PropagationCriteriaFactory ();
    CosCompoundExternalization::PropagationCriteriaFactory_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 PropagationCriteriaFactory * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual ::CosGraphs::TraversalCriteria_ptr create_for_externalize() = 0;

  protected:
    PropagationCriteriaFactory () {};

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

}


namespace POA_CosStream
{

class StreamableFactory : virtual public PortableServer::StaticImplementation
{
  public:
    virtual ~StreamableFactory ();
    CosStream::StreamableFactory_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 StreamableFactory * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual ::CosStream::Streamable_ptr create_uninitialized() = 0;

  protected:
    StreamableFactory () {};

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

}


namespace POA_CosCompoundExternalization
{

class NodeStreamableFactory : 
  virtual public POA_CosStream::StreamableFactory,
  virtual public POA_CosGraphs::NodeFactory
{
  public:
    virtual ~NodeStreamableFactory ();
    CosCompoundExternalization::NodeStreamableFactory_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 NodeStreamableFactory * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

  protected:
    NodeStreamableFactory () {};

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

}


namespace POA_CosStream
{

class StreamIO : virtual public PortableServer::StaticImplementation
{
  public:
    virtual ~StreamIO ();
    CosStream::StreamIO_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 StreamIO * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual void write_string( const char* aString ) = 0;
    virtual void write_char( CORBA::Char aChar ) = 0;
    virtual void write_octet( CORBA::Octet anOctet ) = 0;
    virtual void write_unsigned_long( CORBA::ULong anUnsignedLong ) = 0;
    virtual void write_unsigned_short( CORBA::UShort anUnsignedShort ) = 0;
    virtual void write_long( CORBA::Long aLong ) = 0;
    virtual void write_short( CORBA::Short aShort ) = 0;
    virtual void write_float( CORBA::Float aFloat ) = 0;
    virtual void write_double( CORBA::Double aDouble ) = 0;
    virtual void write_boolean( CORBA::Boolean aBoolean ) = 0;
    virtual void write_object( ::CosStream::Streamable_ptr aStreamable ) = 0;
    virtual void write_graph( ::CosCompoundExternalization::Node_ptr starting_node ) = 0;
    virtual void write_long_long( CORBA::LongLong val ) = 0;
    virtual void write_unsigned_long_long( CORBA::ULongLong val ) = 0;
    virtual void write_long_double( CORBA::LongDouble val ) = 0;
    virtual void write_fixed( const CORBA::Any& val, CORBA::Short s ) = 0;
    virtual char* read_string() = 0;
    virtual CORBA::Char read_char() = 0;
    virtual CORBA::Octet read_octet() = 0;
    virtual CORBA::ULong read_unsigned_long() = 0;
    virtual CORBA::UShort read_unsigned_short() = 0;
    virtual CORBA::Long read_long() = 0;
    virtual CORBA::Short read_short() = 0;
    virtual CORBA::Float read_float() = 0;
    virtual CORBA::Double read_double() = 0;
    virtual CORBA::Boolean read_boolean() = 0;
    virtual ::CosStream::Streamable_ptr read_object( ::CosLifeCycle::FactoryFinder_ptr there, ::CosStream::Streamable_ptr aStreamable ) = 0;
    virtual void read_graph( ::CosCompoundExternalization::Node_ptr starting_node, ::CosLifeCycle::FactoryFinder_ptr there ) = 0;
    virtual CORBA::LongLong read_long_long() = 0;
    virtual CORBA::ULongLong read_unsigned_long_long() = 0;
    virtual CORBA::LongDouble read_long_double() = 0;
    virtual CORBA::Any* read_fixed() = 0;

  protected:
    StreamIO () {};

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

}


namespace POA_CosExternalization
{

class Stream : 
  virtual public POA_CosLifeCycle::LifeCycleObject
{
  public:
    virtual ~Stream ();
    CosExternalization::Stream_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 Stream * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual void externalize( ::CosStream::Streamable_ptr theObject ) = 0;
    virtual ::CosStream::Streamable_ptr internalize( ::CosLifeCycle::FactoryFinder_ptr there ) = 0;
    virtual void begin_context() = 0;
    virtual void end_context() = 0;
    virtual void flush() = 0;

  protected:
    Stream () {};

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

class StreamFactory : virtual public PortableServer::StaticImplementation
{
  public:
    virtual ~StreamFactory ();
    CosExternalization::StreamFactory_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 StreamFactory * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual ::CosExternalization::Stream_ptr create() = 0;

  protected:
    StreamFactory () {};

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

class FileStreamFactory : virtual public PortableServer::StaticImplementation
{
  public:
    virtual ~FileStreamFactory ();
    CosExternalization::FileStreamFactory_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 FileStreamFactory * _narrow (PortableServer::Servant);
    virtual CORBA::Object_ptr _make_stub (PortableServer::POA_ptr, CORBA::Object_ptr);

    virtual ::CosExternalization::Stream_ptr create( const char* theFileName ) = 0;

  protected:
    FileStreamFactory () {};

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

}


#endif // MICO_CONF_NO_POA

void operator<<=( CORBA::Any &a, const ::CosStream::ObjectCreationError &e );
void operator<<=( CORBA::Any &a, ::CosStream::ObjectCreationError *e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::CosStream::ObjectCreationError &e );

CORBA::Boolean operator>>=( const CORBA::Any &a, const ::CosStream::ObjectCreationError *&e );

extern CORBA::StaticTypeInfo *_marshaller_CosStream_ObjectCreationError;

void operator<<=( CORBA::Any &a, const ::CosStream::StreamDataFormatError &e );
void operator<<=( CORBA::Any &a, ::CosStream::StreamDataFormatError *e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::CosStream::StreamDataFormatError &e );

CORBA::Boolean operator>>=( const CORBA::Any &a, const ::CosStream::StreamDataFormatError *&e );

extern CORBA::StaticTypeInfo *_marshaller_CosStream_StreamDataFormatError;

void operator<<=( CORBA::Any &a, const CosStream::Streamable_ptr obj );
void operator<<=( CORBA::Any &a, CosStream::Streamable_ptr* obj_ptr );
CORBA::Boolean operator>>=( const CORBA::Any &a, CosStream::Streamable_ptr &obj );

extern CORBA::StaticTypeInfo *_marshaller_CosStream_Streamable;

void operator<<=( CORBA::Any &a, const CosCompoundExternalization::Node_ptr obj );
void operator<<=( CORBA::Any &a, CosCompoundExternalization::Node_ptr* obj_ptr );
CORBA::Boolean operator>>=( const CORBA::Any &a, CosCompoundExternalization::Node_ptr &obj );

extern CORBA::StaticTypeInfo *_marshaller_CosCompoundExternalization_Node;

void operator<<=( CORBA::Any &_a, const ::CosCompoundExternalization::RelationshipHandle &_s );
void operator<<=( CORBA::Any &_a, ::CosCompoundExternalization::RelationshipHandle *_s );
CORBA::Boolean operator>>=( const CORBA::Any &_a, ::CosCompoundExternalization::RelationshipHandle &_s );
CORBA::Boolean operator>>=( const CORBA::Any &_a, const ::CosCompoundExternalization::RelationshipHandle *&_s );

extern CORBA::StaticTypeInfo *_marshaller_CosCompoundExternalization_RelationshipHandle;

void operator<<=( CORBA::Any &a, const CosCompoundExternalization::Role_ptr obj );
void operator<<=( CORBA::Any &a, CosCompoundExternalization::Role_ptr* obj_ptr );
CORBA::Boolean operator>>=( const CORBA::Any &a, CosCompoundExternalization::Role_ptr &obj );

extern CORBA::StaticTypeInfo *_marshaller_CosCompoundExternalization_Role;

void operator<<=( CORBA::Any &a, const CosCompoundExternalization::Relationship_ptr obj );
void operator<<=( CORBA::Any &a, CosCompoundExternalization::Relationship_ptr* obj_ptr );
CORBA::Boolean operator>>=( const CORBA::Any &a, CosCompoundExternalization::Relationship_ptr &obj );

extern CORBA::StaticTypeInfo *_marshaller_CosCompoundExternalization_Relationship;

void operator<<=( CORBA::Any &a, const CosCompoundExternalization::PropagationCriteriaFactory_ptr obj );
void operator<<=( CORBA::Any &a, CosCompoundExternalization::PropagationCriteriaFactory_ptr* obj_ptr );
CORBA::Boolean operator>>=( const CORBA::Any &a, CosCompoundExternalization::PropagationCriteriaFactory_ptr &obj );

extern CORBA::StaticTypeInfo *_marshaller_CosCompoundExternalization_PropagationCriteriaFactory;

void operator<<=( CORBA::Any &a, const CosStream::StreamableFactory_ptr obj );
void operator<<=( CORBA::Any &a, CosStream::StreamableFactory_ptr* obj_ptr );
CORBA::Boolean operator>>=( const CORBA::Any &a, CosStream::StreamableFactory_ptr &obj );

extern CORBA::StaticTypeInfo *_marshaller_CosStream_StreamableFactory;

void operator<<=( CORBA::Any &a, const CosCompoundExternalization::NodeStreamableFactory_ptr obj );
void operator<<=( CORBA::Any &a, CosCompoundExternalization::NodeStreamableFactory_ptr* obj_ptr );
CORBA::Boolean operator>>=( const CORBA::Any &a, CosCompoundExternalization::NodeStreamableFactory_ptr &obj );

extern CORBA::StaticTypeInfo *_marshaller_CosCompoundExternalization_NodeStreamableFactory;

void operator<<=( CORBA::Any &a, const CosStream::StreamIO_ptr obj );
void operator<<=( CORBA::Any &a, CosStream::StreamIO_ptr* obj_ptr );
CORBA::Boolean operator>>=( const CORBA::Any &a, CosStream::StreamIO_ptr &obj );

extern CORBA::StaticTypeInfo *_marshaller_CosStream_StreamIO;

void operator<<=( CORBA::Any &a, const ::CosExternalization::InvalidFileNameError &e );
void operator<<=( CORBA::Any &a, ::CosExternalization::InvalidFileNameError *e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::CosExternalization::InvalidFileNameError &e );

CORBA::Boolean operator>>=( const CORBA::Any &a, const ::CosExternalization::InvalidFileNameError *&e );

extern CORBA::StaticTypeInfo *_marshaller_CosExternalization_InvalidFileNameError;

void operator<<=( CORBA::Any &a, const ::CosExternalization::ContextAlreadyRegistered &e );
void operator<<=( CORBA::Any &a, ::CosExternalization::ContextAlreadyRegistered *e );
CORBA::Boolean operator>>=( const CORBA::Any &a, ::CosExternalization::ContextAlreadyRegistered &e );

CORBA::Boolean operator>>=( const CORBA::Any &a, const ::CosExternalization::ContextAlreadyRegistered *&e );

extern CORBA::StaticTypeInfo *_marshaller_CosExternalization_ContextAlreadyRegistered;

void operator<<=( CORBA::Any &a, const CosExternalization::Stream_ptr obj );
void operator<<=( CORBA::Any &a, CosExternalization::Stream_ptr* obj_ptr );
CORBA::Boolean operator>>=( const CORBA::Any &a, CosExternalization::Stream_ptr &obj );

extern CORBA::StaticTypeInfo *_marshaller_CosExternalization_Stream;

void operator<<=( CORBA::Any &a, const CosExternalization::StreamFactory_ptr obj );
void operator<<=( CORBA::Any &a, CosExternalization::StreamFactory_ptr* obj_ptr );
CORBA::Boolean operator>>=( const CORBA::Any &a, CosExternalization::StreamFactory_ptr &obj );

extern CORBA::StaticTypeInfo *_marshaller_CosExternalization_StreamFactory;

void operator<<=( CORBA::Any &a, const CosExternalization::FileStreamFactory_ptr obj );
void operator<<=( CORBA::Any &a, CosExternalization::FileStreamFactory_ptr* obj_ptr );
CORBA::Boolean operator>>=( const CORBA::Any &a, CosExternalization::FileStreamFactory_ptr &obj );

extern CORBA::StaticTypeInfo *_marshaller_CosExternalization_FileStreamFactory;

#endif
