Ejemplo n.º 1
0
test_pinc()
{
	_Bool local;

	b = 0;
	local = pinc();
	assert(b == 1 && local == 0);

	b = 1;
	local = pinc();
	assert(b == 1 && local == 1);
}
Ejemplo n.º 2
0
void circuitgeometry::addInputPins(int ioIndex, circuitmatrix& paramCirc, int i, int j)
{
	inputpin pins;//8 ints with value -100
	int type = (paramCirc.at(i).at(j) == AA ? ATYPE : YTYPE);

	pins[TYPE] = type;
	pins[INJNR] = ioIndex;

	for (int si = 0; si < 2; si++)
	{
		coordinate pinc(simplegeom.coords[ioIndex]);

		int where = getInputCoordAxis();

		pinc[where] += (DELTA / 2) - DELTA * (si % 2);

		//pins.insert(pins.begin() + OFFSETNONCOORD, pinc.begin(), pinc.end()); //coord of pin
		//pins.insert(pins.end(), pinc.begin(), pinc.end()); //coord of pin
		pins.setCoordinate(si, pinc);
	}

	allpins.addEntry(pins);
}