In legion build config, updated path to GNU tools and updated deprecated Sun CC flag...
[OpenSPARC-T2-SAM] / sam-t2 / sam / cpus / vonk / ss / api / memsync / src / TsoEdge.h
/*
* ========== Copyright Header Begin ==========================================
*
* OpenSPARC T2 Processor File: TsoEdge.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
*
* The above named program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
*
* The above named program 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*
* ========== Copyright Header End ============================================
*/
#ifndef _TSOEDGE_H
#define _TSOEDGE_H
/************************************************************************
**
** Copyright (C) 2002, Sun Microsystems, Inc.
**
** Sun considers its source code as an unpublished, proprietary
** trade secret and it is available only under strict license provisions.
** This copyright notice is placed here only to protect Sun in the event
** the source is deemed a published work. Disassembly, decompilation,
** or other means of reducing the object code to human readable form
** is prohibited by the license agreement under which this code is
** provided to the user or company in possession of this copy."
**
*************************************************************************/
#include <iostream>
#include "TsoCheckerDefs.h"
#include "TsoNode.h"
namespace Tso {
class TsoNode;
class TsoEdge {
public:
/**
* Default constructor
*/
TsoEdge();
/**
* Copy constructor
*
* @param orig The TsoEdge object to copy.
*/
TsoEdge( const TsoEdge &orig );
/**
* Destructor
*/
virtual ~TsoEdge();
/**
* Equality operator
*
* @param rhs The right hand side of the equality operator
* @return Return true if this objec and rhs are equal,
* otherwise return false
*/
bool operator==( const TsoEdge &rhs ) const;
/**
* Assignment operator
*
* @param rhs The right hand side of the assignment operator.
* @return The lvalue of the assignment.
*/
const TsoEdge & operator=( const TsoEdge &rhs );
/**
* Return a string representation of this TsoEdge object.
*/
std::string toString() const;
/**
* Find the edge between src and dst with the same type
* @param src Pointer of the edge's source node
* @param dst Pointer of the edge's destination node
* @param type Edge type
* @return the iterator of the edge if found, or src->outEnd() otherwise
* @see TsoChecherDefs.h
*/
std::list<TsoEdge*>::iterator findEdge (TsoNode* src, TsoNode* dst, enum EDGE_TYPE type);
/**
* Form an edge between from src to dst with the type
* @param type Edge type
* @param src Pointer of the edge's source node
* @param dst Pointer of the edge's destination node
* @return the iterator of the edge
* @see TsoChecherDefs.h
*/
TsoEdge* addEdge (enum EDGE_TYPE type, TsoNode* src, TsoNode* dst);
/******************************************************************
* Private variable get/set methods
******************************************************************/
void setSrc (TsoNode* src) { src_ = src; }
void setDst (TsoNode* dst) { dst_ = dst; }
void setType (EDGE_TYPE type) { type_ = type; }
enum EDGE_TYPE getType() const { return type_; }
TsoNode* getSrc () const { return src_; }
TsoNode* getDst () const { return dst_; }
protected:
private:
/**
* type_ is the edge type defined in
* @see TsoCheckerDefs.h
*/
enum EDGE_TYPE type_;
/**
* src_ is the pointer to the source TsoNode
*/
TsoNode *src_;
/**
* dst_ is the pointer to the destination TsoNode
*/
TsoNode *dst_;
};
} /* namespace Tso */
#endif /* _TSOEDGE_H */