Class Reference sElement

A single schematic element. More...

Member

void addParameter(string parameter , string value)
double getDoubleParameter(string parameter)
int getIntParameter(string parameter)
string getParameter(string parameter)
point getPoint()
pointArray getPoints()
point getPortPos(string portname)
bool isGlobal()
bool isPortOrBusport()
bool isArc()
bool isBus()
bool isBusport()
bool isCircle()
bool isDevice()
bool isPolyline()
bool isPolygon()
bool isPort()
bool isRect()
bool isText()
bool isWire()
bool isWireLabel()
void setColor(int red,int green, int blue
void setParameter(string parameter, string value)

Detailed Description

Member Function Documentation


void sElement::addParameter(string parameter , string value)

A parameter will be added to the element and set. If the parameter exists, it will be set to to the new value.


double sElement::getDoubleParameter(string parameter)

Returns: the value of parameter is returned. Only double parameter will be return. 0 is return in all other cases.


int sElement::getIntParameter(string parameter)

Returns: the value of parameter is returned. Only integer parameter will be return. -1 is return in all other cases.


string sElement::getParameter(string parameter)

Returns: the value of parameter is returned. Numerical parameters will be converted to strings.


point sElement::getPoint()

point of single points elements


pointArray sElement::getPoints()

points of multi points elements


point sElement::getPortPos(string portname)

Returns: the position of the port with the name portname, if the element is an device. point(-123456789,-123456789) is return if a port with the name does not exist.


bool sElement::isGlobal()

true if port is a global port


bool sElement::isPortOrBusport()

true if it is a port or a busport


bool sElement::isArc()

true if it is a arc


bool sElement::isBus()

true if it is a bus


bool sElement::isBusport()

true if it is a busport


bool sElement::isCircle()

true if it is a circle


bool sElement::isDevice()

true if it is a device


bool sElement::isPolyline()

true if it is a polyline


bool sElement::isPolygon()

true if it is a polygon


bool sElement::isPort()

true if it is a port


bool sElement::isRect()

true if it is a rect


bool sElement::isText()

true if it is a text


bool sElement::isWire()

true if it is a wire


bool sElement::isWireLabel()

true if it is a wire label


void sElement::setColor(int red,int green, int blue

set the color of non functions elements like a polygon. The color of function element is set via the class setup. (introduced with release 20180501)


void sElement::setParameter(string parameter, string value)

parameter is set to value. This method is similar to the method addParameter, but will never add a new one.