/******************************************************************************
    Copyright (c) 1997-1999 Coware, Inc.    ALL RIGHTS RESERVED

The following code is derived, directly or indirectly, from the SystemC
source code released by Synopsys, Inc Copyright (c) 1996-2001, Synopsys,
Inc., CoWare, Inc., Frontier Design, Inc. and others. All Rights reserved.
The contents of this file are subject to the restrictions and limitations
set forth in the SystemC Open Source License Version 2.0 (the "License");
You may not use this file except in compliance with such restrictions and
limitations. You may obtain instructions on how to receive a copy of the
License at http://www.systemc.org/.  Software distributed by Contributors
under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY KIND, either express or implied. See the License for the specific
language governing rights and limitations under the License."

******************************************************************************/

/******************************************************************************
    sc_slave_port.h -- slave_port class for SC_SLAVE process  
    

    Authors 
	: Harish Sarin, CoWare Inc. (harish@coware.com)
	: Cesar Quiroz, CoWare Inc. (cesar@coware.com)
	: Vijay Kumar,  CoWare Inc. (vijay@coware.com)



    MODIFICATION LOG - modifiers, enter your name, affliation and
    changes you are making here:

    Modifier Name & Affiliation:
    Description of Modification:
    

******************************************************************************/

#ifndef SC_SLAVE_PORT_H
#define SC_SLAVE_PORT_H

class sc_pport_b;
// the following include is remove the unfortunate order dependency
// of include files.
// The macro SC_LOGIC_VECTOR_H controls wether some function get defined
// for sc_unsigned or not.
#include "sc_logic_vector.h"

class sc_slave_port {
    friend class sc_module;

private:
    sc_module* module; // back pointer to the containing module

    // process modes 
    enum MyEnum { SC_NONE=0, SC_ASYNC=1, SC_APROC=2 }mode;
    sc_process_b* process_handle;
    sc_pport_b* s_port;

    sc_slave_port& operator=(const sc_slave_port&);
    sc_slave_port(const sc_slave_port&);

    // Constructor
    sc_slave_port(sc_module* p);
    virtual ~sc_slave_port();

public:
    // process handles
    sc_slave_port& operator<<(const sc_aproc_process_handle& p);
    sc_slave_port& operator<<(const sc_async_process_handle& p);

    // ports registered with current process 
    sc_slave_port& operator<<(sc_pport_b& s);
    sc_slave_port& operator()(sc_pport_b& s);

};


#endif
