/* -*- mode: c++; c-basic-offset: 4; -*-
 *
 * MICO --- a CORBA implementation
 * Copyright (C) 1997-98 Kay Roemer & Arno Puder
 * 
 * Operation provider basic impl.
 * Copyright (C) 1999 Andreas Schultz                                 
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * Send comments and/or bug reports to:
 *                mico@informatik.uni-frankfurt.de
 *
 */


#ifndef __mico_operation_impl_h__
#define __mico_operation_impl_h__

/******************* OperationInfoNode *******************************/

inline ThreadPool& OperationInfoNode::getThreadPool() const {
    return *tp;
};

inline void OperationInfoNode::setThreadPool(ThreadPool* _tp) {
    tp = _tp;
};

inline OP_id_type OperationInfoNode::get_OP_id() const { return OP_id; };

inline void OperationInfoNode::set_OP_id( const OP_id_type _id ) { OP_id = _id; };

inline MsgChannel& OperationInfoNode::get_nextOP() const {
    return *nextOP;
};

inline void OperationInfoNode::set_nextOP( MsgChannel& _nextOP) {
    nextOP = &_nextOP;
};


/******************** Operation ***************************************/

inline void Operation::start() {
    //    Thread().start();
    Thread()->post_state_change();
}

inline void Operation::Info( OperationInfoNode &_info ) { info = &_info; };

inline OperationInfoNode& Operation::Info() const { return *info; };

inline void Operation::Thread( WorkerThread *_thr ) { thr = _thr; };

inline WorkerThread* Operation::Thread() const { return thr; };

#endif // __mico_operation_impl_h__
