//
// generated by Qedo
//

#ifndef _dinner_CutleryImpl_H_
#define _dinner_CutleryImpl_H_


// BEGIN USER INSERT SECTION file_pre
// END USER INSERT SECTION file_pre


#include <CORBA.h>
#include "dinner_CutleryImpl_BUSINESS.h"
#include "component_valuetypes.h"
#include "RefCountBase.h"
#include <string>


// BEGIN USER INSERT SECTION file_post
using namespace std;
// END USER INSERT SECTION file_post


namespace dinner
{
    
    //
    // executor
    //
    class CutlerySessionImpl
        : public virtual CORBA::LocalObject
        , public virtual ::dinner::CCM_CutlerySessionImpl
#ifndef MICO_ORB
        , public virtual Qedo::RefCountLocalObject
#endif
// BEGIN USER INSERT SECTION INHERITANCE_CutlerySessionImpl
// END USER INSERT SECTION INHERITANCE_CutlerySessionImpl
    {
    
    private:
    
        ::dinner::CCM_Cutlery_ContextImpl_var context_;
        
    public:
    
        CutlerySessionImpl();
        virtual ~CutlerySessionImpl();
        
        void set_context(::dinner::CCM_Cutlery_ContextImpl_ptr context)
            throw (CORBA::SystemException, Components::CCMException);
        
        void configuration_complete()
            throw (CORBA::SystemException, Components::InvalidConfiguration);
        
        void remove()
            throw (CORBA::SystemException);
        
        
        //
        // IDL:dinner/Named/name:1.0
        //
        void name(const char* param)
        	throw(CORBA::SystemException);
        char* name()
        	throw(CORBA::SystemException);
    
// BEGIN USER INSERT SECTION CutlerySessionImpl
	private:
		string id_;
// END USER INSERT SECTION CutlerySessionImpl

    };
    
    
    //
    // segment
    //
    class Seg
        : public virtual CORBA::LocalObject
        , public virtual ::dinner::CCM_Seg
#ifndef MICO_ORB
        , public virtual Qedo::RefCountLocalObject
#endif
// BEGIN USER INSERT SECTION INHERITANCE_Seg
// END USER INSERT SECTION INHERITANCE_Seg
    {
    
    private:
    
        ::dinner::CCM_Cutlery_ContextImpl_var context_;
        
    public:
    
        Seg();
        virtual ~Seg();
        
        void set_context(::dinner::CCM_Cutlery_ContextImpl_ptr context)
            throw (CORBA::SystemException, Components::CCMException);
        
        void configuration_complete()
            throw (CORBA::SystemException, Components::InvalidConfiguration);
        
        
        //
        // IDL:dinner/Fork/obtain_fork:1.0
        //
        virtual Components::Cookie* obtain_fork()
        	throw(CORBA::SystemException, ::dinner::ForkNotAvailable);
        
        //
        // IDL:dinner/Fork/release_fork:1.0
        //
        virtual void release_fork(Components::Cookie* ck)
        	throw(CORBA::SystemException, ::dinner::NotTheEater);
    
// BEGIN USER INSERT SECTION Seg
		private:
			bool in_use_;
// END USER INSERT SECTION Seg

    };
    
    
    //
    // executor locator
    //
    class CutleryImpl
        : public virtual CORBA::LocalObject
        , public virtual Components::SessionExecutorLocator
#ifndef MICO_ORB
        , public virtual Qedo::RefCountLocalObject
#endif
// BEGIN USER INSERT SECTION INHERITANCE_CutleryImpl
// END USER INSERT SECTION INHERITANCE_CutleryImpl
    {
    
    private:
    
        ::dinner::CCM_Cutlery_ContextImpl_var context_;
        
        CutlerySessionImpl* component_;
        
        Seg* Seg_;
        
    public:
    
        CutleryImpl();
        virtual ~CutleryImpl();
        
        
        //
        // IDL:Components/ExecutorLocator/obtain_executor:1.0
        //
        virtual CORBA::Object_ptr obtain_executor(const char* name)
        	throw(CORBA::SystemException);
        
        //
        // IDL:Components/ExecutorLocator/release_executor:1.0
        //
        virtual void release_executor(CORBA::Object_ptr exc)
        	throw(CORBA::SystemException);
        
        //
        // IDL:Components/ExecutorLocator/configuration_complete:1.0
        //
        virtual void configuration_complete()
        	throw(CORBA::SystemException, ::Components::InvalidConfiguration);
        
        //
        // IDL:Components/SessionComponent/set_session_context:1.0
        //
        virtual void set_session_context(Components::SessionContext_ptr ctx)
        	throw(CORBA::SystemException, ::Components::CCMException);
        
        //
        // IDL:Components/SessionComponent/ccm_activate:1.0
        //
        virtual void ccm_activate()
        	throw(CORBA::SystemException, ::Components::CCMException);
        
        //
        // IDL:Components/SessionComponent/ccm_passivate:1.0
        //
        virtual void ccm_passivate()
        	throw(CORBA::SystemException, ::Components::CCMException);
        
        //
        // IDL:Components/SessionComponent/ccm_remove:1.0
        //
        virtual void ccm_remove()
        	throw(CORBA::SystemException, ::Components::CCMException);
    
// BEGIN USER INSERT SECTION CutleryImpl
// END USER INSERT SECTION CutleryImpl

    };
    
    
    //
    // home executor
    //
    class CutleryHomeImpl
        : public virtual CORBA::LocalObject
        , public virtual ::dinner::CCM_CutleryHome
#ifndef MICO_ORB
        , public virtual Qedo::RefCountLocalObject
#endif
// BEGIN USER INSERT SECTION INHERITANCE_CutleryHomeImpl
// END USER INSERT SECTION INHERITANCE_CutleryHomeImpl
    {
    
    private:
    
        Components::HomeContext_var context_;
        
    public:
        CutleryHomeImpl();
        virtual ~CutleryHomeImpl();
        
        //
        // IDL:Components/HomeExecutorBase/set_context:1.0
        //
        virtual void set_context (Components::HomeContext_ptr ctx)
            throw (CORBA::SystemException, Components::CCMException);
        
        //
        // IDL:.../create:1.0
        //
        virtual ::Components::EnterpriseComponent_ptr create()
            throw (CORBA::SystemException, Components::CreateFailure);
    
// BEGIN USER INSERT SECTION CutleryHomeImpl
// END USER INSERT SECTION CutleryHomeImpl

    };
    
};

//
// entry point
//
extern "C" {
#ifdef _WIN32
__declspec(dllexport)
#else
#endif
::Components::HomeExecutorBase_ptr create_CutleryHomeE(void);
}

#endif
