137 lines
3.8 KiB
C++
137 lines
3.8 KiB
C++
// -*- C++ -*-
|
|
|
|
namespace OpenChams {
|
|
/*! \class WirePoint
|
|
*
|
|
* This class describes wire point.
|
|
* A wire point is an abstract object used to define all "direction changing" points of a wire.
|
|
*/
|
|
|
|
/*! \class InstancePoint
|
|
*
|
|
* This class describes a wire point associated to an instance's connector.
|
|
*/
|
|
|
|
/*! \fn InstancePoint::InstancePoint(Name name, Name connector)
|
|
* \brief creates a new wire point associated to an instance's connector.
|
|
*
|
|
* \param name the name of the instance.
|
|
* \param connector the name of the connector.
|
|
*/
|
|
|
|
/*! \fn inline Name InstancePoint::getName()
|
|
* \brief returns the name of the instance associated to the instancePoint.
|
|
*/
|
|
|
|
/*! \fn inline Name InstancePoint::getPlug()
|
|
* \brief returns the name of the connector associated to the instancePoint.
|
|
*/
|
|
|
|
/*! \class PortPoint
|
|
*
|
|
* this class describes a wire point associated to a Port.
|
|
*/
|
|
|
|
/*! \fn PortPoint::PortPoint(unsigned idx)
|
|
* \brief creates a new wire point associated to a port.
|
|
*
|
|
* \param idx the index of the port associated to the portPoint.
|
|
*
|
|
* \note The index of the port is only valid considering the net to which the wire is relative.
|
|
*/
|
|
|
|
/*! \fn inline unsigned PortPoint::getIndex()
|
|
* \brief returns the index of the port associated to the portPoint.
|
|
*/
|
|
|
|
/*! \class IntermediatePoint
|
|
*
|
|
* This class describes a wire point defined by its (x,y) coordinates.
|
|
*/
|
|
|
|
/*! \fn IntermediatePoint::IntermediatePoint(double x, double y)
|
|
* \brief creates a new wire point based on its (x,y) coordinates.
|
|
*
|
|
* \param x the x coordinate.
|
|
* \param y the y coordinate.
|
|
*/
|
|
|
|
/*! \fn inline double IntermediatePoint::getX()
|
|
* \brief returns the x coordinate.
|
|
*/
|
|
|
|
/*! \fn inline double IntermediatePoint::getY()
|
|
* \brief returns the y coordinate.
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*! \class Wire
|
|
*
|
|
* This class describes wire.
|
|
*
|
|
* A wire is used by schematic to the connections between instances.
|
|
* It is defined by:
|
|
* - a start point (InstancePoint or PortPoint),
|
|
* - a end point (InstancePoint or PortPoint),
|
|
* - a list of IntermediatePoint, this list may be empty.
|
|
*
|
|
* \note Althought the Wire object is related to Schematic, it is handled by Net object since a wire is always associated to a Net.
|
|
*/
|
|
|
|
/*! \fn Wire::Wire()
|
|
* \brief creates a new wire.
|
|
*/
|
|
|
|
/*! \fn inline WirePoint* Wire::getStartPoint()
|
|
* \brief returns the start point of the wire.
|
|
*/
|
|
|
|
/*! \fn inline WirePoint* Wire::getEndPoint()
|
|
* \brief returns the end point of the wire.
|
|
*/
|
|
|
|
/*! \fn inline bool Wire::hasNoIntermediatePoints()
|
|
* \brief returns true if the wire has no IntermediatePoint.
|
|
*/
|
|
|
|
/*! \fn inline const std::vector<IntermediatePoint*>& Wire::getIntermediatePoints()
|
|
* \brief returns the list of wire's IntermediatePoint.
|
|
*/
|
|
|
|
/*! \fn void Wire::setStartPoint(Name name, Name connector)
|
|
* \brief sets the wire's start point as an InstancePoint.
|
|
*
|
|
* \param name the name of the instance associated to the InstancePoint.
|
|
* \param connector the name of the connector associated to the InstancePoint.
|
|
*/
|
|
|
|
/*! \fn void Wire::setStartPoint(unsigned idx)
|
|
* \brief sets the wire's start point as a PortPoint.
|
|
*
|
|
* \param idx the index of the port associated to the PortPoint.
|
|
*/
|
|
|
|
/*! \fn void Wire::setEndPoint(Name name, Name connector)
|
|
* \brief sets the wire's end point as an InstancePoint.
|
|
*
|
|
* \param name the name of the instance associated to the InstancePoint.
|
|
* \param connector the name of the connector associated to the InstancePoint.
|
|
*/
|
|
|
|
/*! \fn void Wire::setEndPoint(unsigned idx)
|
|
* \brief sets the wire's end point as a PortPoint.
|
|
*
|
|
* \param idx the index of the port associated to the PortPoint.
|
|
*/
|
|
|
|
/*! \fn void Wire::addIntermediatePoint(double x, double y)
|
|
* \brief adds an IntermediatePoint to the wire.
|
|
*
|
|
* \param x the x coordinate of the IntermediatePoint.
|
|
* \param y the y coordinate of the IntermediatePoint.
|
|
*/
|
|
}
|