new collections in progress
This commit is contained in:
parent
cd1c194268
commit
e7df77f51d
|
@ -6,9 +6,9 @@
|
|||
set ( sources ProxyProperty.cpp
|
||||
PyBox.cpp
|
||||
PyCell.cpp
|
||||
PyCellLocator.cpp
|
||||
#PyCellCollection.cpp
|
||||
PyComponent.cpp
|
||||
PyComponentLocator.cpp
|
||||
# PyComponentLocator.cpp
|
||||
PyContact.cpp
|
||||
PyDataBase.cpp
|
||||
PyEntity.cpp
|
||||
|
@ -16,25 +16,24 @@
|
|||
PyHurricane.cpp
|
||||
PyHyperNet.cpp
|
||||
PyInstance.cpp
|
||||
PyInstanceLocator.cpp
|
||||
#PyInstanceLocator.cpp
|
||||
PyLayer.cpp
|
||||
PyLibrary.cpp
|
||||
PyName.cpp
|
||||
PyNet.cpp
|
||||
PyNetLocator.cpp
|
||||
PyNetCollection.cpp
|
||||
PyOccurrence.cpp
|
||||
PyOccurrenceLocator.cpp
|
||||
#PyOccurrenceLocator.cpp
|
||||
PyPath.cpp
|
||||
PyPin.cpp
|
||||
PyPinLocator.cpp
|
||||
#PyPinLocator.cpp
|
||||
PyPlug.cpp
|
||||
PyPlugLocator.cpp
|
||||
#PyPlugLocator.cpp
|
||||
PyPoint.cpp
|
||||
PyReference.cpp
|
||||
PyReferenceLocator.cpp
|
||||
#PyReferenceLocator.cpp
|
||||
PySegment.cpp
|
||||
PySegmentLocator.cpp
|
||||
#PySegmentLocator.cpp
|
||||
PyTechnology.cpp
|
||||
PyTransformation.cpp
|
||||
PyDbU.cpp
|
||||
|
@ -45,9 +44,9 @@
|
|||
set ( includes hurricane/isobar/ProxyProperty.h
|
||||
hurricane/isobar/PyBox.h
|
||||
hurricane/isobar/PyCell.h
|
||||
hurricane/isobar/PyCellLocator.h
|
||||
hurricane/isobar/PyCellCollection.h
|
||||
hurricane/isobar/PyComponent.h
|
||||
hurricane/isobar/PyComponentLocator.h
|
||||
hurricane/isobar/PyComponentCollection.h
|
||||
hurricane/isobar/PyContact.h
|
||||
hurricane/isobar/PyDataBase.h
|
||||
hurricane/isobar/PyEntity.h
|
||||
|
@ -55,24 +54,24 @@
|
|||
hurricane/isobar/PyHurricane.h
|
||||
hurricane/isobar/PyHyperNet.h
|
||||
hurricane/isobar/PyInstance.h
|
||||
hurricane/isobar/PyInstanceLocator.h
|
||||
hurricane/isobar/PyInstanceCollection.h
|
||||
hurricane/isobar/PyLayer.h
|
||||
hurricane/isobar/PyLibrary.h
|
||||
hurricane/isobar/PyName.h
|
||||
hurricane/isobar/PyNet.h
|
||||
hurricane/isobar/PyNetLocator.h
|
||||
hurricane/isobar/PyNetCollection.h
|
||||
hurricane/isobar/PyOccurrence.h
|
||||
hurricane/isobar/PyOccurrenceLocator.h
|
||||
hurricane/isobar/PyOccurrenceCollection.h
|
||||
hurricane/isobar/PyPath.h
|
||||
hurricane/isobar/PyPin.h
|
||||
hurricane/isobar/PyPinLocator.h
|
||||
hurricane/isobar/PyPinCollection.h
|
||||
hurricane/isobar/PyPlug.h
|
||||
hurricane/isobar/PyPlugLocator.h
|
||||
hurricane/isobar/PyPlugCollection.h
|
||||
hurricane/isobar/PyPoint.h
|
||||
hurricane/isobar/PyReference.h
|
||||
hurricane/isobar/PyReferenceLocator.h
|
||||
hurricane/isobar/PyReferenceCollection.h
|
||||
hurricane/isobar/PySegment.h
|
||||
hurricane/isobar/PySegmentLocator.h
|
||||
hurricane/isobar/PySegmentCollection.h
|
||||
hurricane/isobar/PyTechnology.h
|
||||
hurricane/isobar/PyTransformation.h
|
||||
hurricane/isobar/PyDbU.h
|
||||
|
|
|
@ -58,9 +58,9 @@
|
|||
#include "hurricane/isobar/ProxyProperty.h"
|
||||
#include "hurricane/isobar/PyNet.h"
|
||||
#include "hurricane/isobar/PyNetCollection.h"
|
||||
#include "hurricane/isobar/PyReferenceLocator.h"
|
||||
#include "hurricane/isobar/PyInstanceLocator.h"
|
||||
#include "hurricane/isobar/PyOccurrenceLocator.h"
|
||||
#include "hurricane/isobar/PyReferenceCollection.h"
|
||||
#include "hurricane/isobar/PyInstanceCollection.h"
|
||||
#include "hurricane/isobar/PyOccurrenceCollection.h"
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
@ -111,7 +111,7 @@ extern "C" {
|
|||
library = cell->getLibrary ();
|
||||
HCATCH
|
||||
|
||||
return PyLibrary_Link ( library );
|
||||
return PyLibrary_Link(library);
|
||||
}
|
||||
|
||||
|
||||
|
@ -130,7 +130,7 @@ extern "C" {
|
|||
pyName->_object = new Name ( cell->getName() );
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyName );
|
||||
return (PyObject*)pyName;
|
||||
}
|
||||
|
||||
|
||||
|
@ -146,7 +146,8 @@ extern "C" {
|
|||
METHOD_HEAD ( "Cell.getInstance()" )
|
||||
|
||||
PyName* arg0;
|
||||
if ( ! ParseOneArg ( "Cell.getInstance", args, NAME_ARG, (PyObject**)&arg0 ) ) return ( NULL );
|
||||
if ( ! ParseOneArg ( "Cell.getInstance", args, NAME_ARG, (PyObject**)&arg0 ) )
|
||||
return NULL;
|
||||
|
||||
instance = cell->getInstance ( *PYNAME_O(arg0) );
|
||||
HCATCH
|
||||
|
@ -156,202 +157,240 @@ extern "C" {
|
|||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyCell_getInstancesLocator ()"
|
||||
// Attribute Method : "PyCell_getInstances()"
|
||||
|
||||
static PyObject* PyCell_getInstancesLocator ( PyCell *self ) {
|
||||
trace << "PyCell_getInstancesLocator ()" << endl;
|
||||
static PyObject* PyCell_getInstances( PyCell *self ) {
|
||||
trace << "PyCell_getInstances()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Cell.getInstancesLocator()" )
|
||||
METHOD_HEAD ( "Cell.getInstances()" )
|
||||
|
||||
Instances instances = cell->getInstances ();
|
||||
|
||||
PyInstanceLocator* pyInstanceLocator = PyObject_NEW ( PyInstanceLocator, &PyTypeInstanceLocator );
|
||||
if (pyInstanceLocator == NULL) { return NULL; }
|
||||
PyInstanceCollection* pyInstanceCollection = NULL;
|
||||
|
||||
HTRY
|
||||
pyInstanceLocator->_object = instances.getLocator ();
|
||||
Instances* instances = new Instances(cell->getInstances());
|
||||
|
||||
pyInstanceCollection = PyObject_NEW(PyInstanceCollection, &PyTypeInstanceCollection);
|
||||
if (pyInstanceCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyInstanceCollection->_object = instances;
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyInstanceLocator );
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyCell_getInstancesUnderLocator ()"
|
||||
|
||||
static PyObject* PyCell_getInstancesUnderLocator ( PyCell *self, PyObject* args ) {
|
||||
PyInstanceLocator* pyInstanceLocator;
|
||||
|
||||
trace << "PyCell_getInstancesUnderLocator ()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Cell.getInstancesUnderLocator()" )
|
||||
|
||||
PyBox* arg0;
|
||||
if ( ! ParseOneArg ( "Cell.getInstancesUnderLocator", args, BOX_ARG, (PyObject**)&arg0 ) ) return ( NULL );
|
||||
|
||||
Instances instances = cell->getInstancesUnder ( *PYBOX_O(arg0) );
|
||||
|
||||
pyInstanceLocator = PyObject_NEW ( PyInstanceLocator, &PyTypeInstanceLocator );
|
||||
if (pyInstanceLocator == NULL) { return NULL; }
|
||||
|
||||
HTRY
|
||||
pyInstanceLocator->_object = instances.getLocator ();
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyInstanceLocator );
|
||||
return (PyObject*)pyInstanceCollection;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyCell_getSlaveInstancesLocator ()"
|
||||
// Attribute Method : "PyCell_getInstancesUnder()"
|
||||
|
||||
static PyObject* PyCell_getSlaveInstancesLocator ( PyCell *self ) {
|
||||
trace << "PyCell_getSlaveInstancesLocator ()" << endl;
|
||||
static PyObject* PyCell_getInstancesUnder(PyCell *self, PyObject* args) {
|
||||
trace << "PyCell_getInstancesUnder()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Cell.getSlaveInstancesLocator()" )
|
||||
METHOD_HEAD("Cell.getInstancesUnder()")
|
||||
|
||||
Instances instances = cell->getSlaveInstances ();
|
||||
PyBox* arg0;
|
||||
if (!ParseOneArg("Cell.getInstancesUnder", args, BOX_ARG, (PyObject**)&arg0))
|
||||
return NULL;
|
||||
|
||||
PyInstanceLocator* pyInstanceLocator = PyObject_NEW ( PyInstanceLocator, &PyTypeInstanceLocator );
|
||||
if (pyInstanceLocator == NULL) { return NULL; }
|
||||
PyInstanceCollection* pyInstanceCollection = NULL;
|
||||
|
||||
HTRY
|
||||
Instances* instances = new Instances(cell->getInstancesUnder(*PYBOX_O(arg0)));
|
||||
|
||||
pyInstanceCollection = PyObject_NEW(PyInstanceCollection, &PyTypeInstanceCollection);
|
||||
if (pyInstanceCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyInstanceCollection->_object = instances;
|
||||
HCATCH
|
||||
|
||||
HTRY
|
||||
pyInstanceLocator->_object = instances.getLocator ();
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyInstanceLocator );
|
||||
return (PyObject*)pyInstanceCollection;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyCell_getOccurrencesLocator ()"
|
||||
// Attribute Method : "PyCell_getSlaveInstances()"
|
||||
|
||||
static PyObject* PyCell_getOccurrencesLocator ( PyCell *self ) {
|
||||
trace << "PyCell_getOccurrencesLocator ()" << endl;
|
||||
static PyObject* PyCell_getSlaveInstances(PyCell *self) {
|
||||
trace << "PyCell_getSlaveInstances()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Cell.getOccurrencesLocator()" )
|
||||
METHOD_HEAD("Cell.getSlaveInstances()")
|
||||
|
||||
Occurrences occurrences = cell->getOccurrences ();
|
||||
|
||||
PyOccurrenceLocator* pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator );
|
||||
if (pyOccurrenceLocator == NULL) { return NULL; }
|
||||
PyInstanceCollection* pyInstanceCollection = NULL;
|
||||
|
||||
HTRY
|
||||
pyOccurrenceLocator->_object = occurrences.getLocator ();
|
||||
HCATCH
|
||||
Instances* instances = new Instances(cell->getSlaveInstances());
|
||||
|
||||
return ( (PyObject*)pyOccurrenceLocator );
|
||||
pyInstanceCollection = PyObject_NEW(PyInstanceCollection, &PyTypeInstanceCollection);
|
||||
if (pyInstanceCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyInstanceCollection->_object = instances;
|
||||
HCATCH
|
||||
|
||||
return (PyObject*)pyInstanceCollection;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyCell_getOccurrences()"
|
||||
|
||||
static PyObject* PyCell_getOccurrences(PyCell *self) {
|
||||
trace << "PyCell_getOccurrences()" << endl;
|
||||
|
||||
METHOD_HEAD("Cell.getOccurrences()")
|
||||
|
||||
PyOccurrenceCollection* pyOccurrenceCollection = NULL;
|
||||
|
||||
HTRY
|
||||
Occurrences* occurrences = new Occurrences(cell->getOccurrences());
|
||||
|
||||
pyOccurrenceCollection = PyObject_NEW(PyOccurrenceCollection, &PyTypeOccurrenceCollection);
|
||||
if (pyOccurrenceCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyOccurrenceCollection->_object = occurrences;
|
||||
HCATCH
|
||||
|
||||
return (PyObject*)pyOccurrenceCollection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyCell_getOccurrencesUnderLocator ()"
|
||||
// Attribute Method : "PyCell_getOccurrencesUnder()"
|
||||
|
||||
static PyObject* PyCell_getOccurrencesUnderLocator ( PyCell *self, PyObject* args ) {
|
||||
trace << "PyCell_getOccurrencesUnderLocator ()" << endl;
|
||||
static PyObject* PyCell_getOccurrencesUnder(PyCell *self, PyObject* args) {
|
||||
trace << "PyCell_getOccurrencesUnder()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Cell.getOccurrencesUnderLocator()" )
|
||||
METHOD_HEAD("Cell.getOccurrencesUnder()")
|
||||
|
||||
PyBox* arg0;
|
||||
if ( ! ParseOneArg ( "Cell.getInstancesUnderLocator", args, BOX_ARG, (PyObject**)&arg0 ) ) return ( NULL );
|
||||
if (!ParseOneArg("Cell.getOccurrencesUnder", args, BOX_ARG, (PyObject**)&arg0))
|
||||
return NULL;
|
||||
|
||||
PyOccurrenceLocator* pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator );
|
||||
if (pyOccurrenceLocator == NULL) { return NULL; }
|
||||
PyOccurrenceCollection* pyOccurrenceCollection = NULL;
|
||||
|
||||
HTRY
|
||||
Occurrences occurrences = cell->getOccurrencesUnder ( *PYBOX_O(arg0) );
|
||||
pyOccurrenceLocator->_object = occurrences.getLocator ();
|
||||
HCATCH
|
||||
Occurrences* occurrences = new Occurrences(cell->getOccurrencesUnder(*PYBOX_O(arg0)));
|
||||
|
||||
return ( (PyObject*)pyOccurrenceLocator );
|
||||
pyOccurrenceCollection = PyObject_NEW(PyOccurrenceCollection, &PyTypeOccurrenceCollection);
|
||||
if (pyOccurrenceCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyOccurrenceCollection->_object = occurrences;
|
||||
HCATCH
|
||||
|
||||
return (PyObject*)pyOccurrenceCollection;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyCell_getLeafInstanceOccurrencesLocator ()"
|
||||
// Attribute Method : "PyCell_getLeafInstanceOccurrences()"
|
||||
|
||||
static PyObject* PyCell_getLeafInstanceOccurrencesLocator ( PyCell *self ) {
|
||||
trace << "PyCell_getLeafInstanceOccurrencesLocator ()" << endl;
|
||||
static PyObject* PyCell_getLeafInstanceOccurrences(PyCell *self) {
|
||||
trace << "PyCell_getLeafInstanceOccurrences()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Cell.getLeafInstanceOccurrencesLocator()" )
|
||||
METHOD_HEAD ( "Cell.getLeafInstanceOccurrences()" )
|
||||
|
||||
Occurrences occurrences = cell->getLeafInstanceOccurrences ();
|
||||
|
||||
PyOccurrenceLocator* pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator );
|
||||
if (pyOccurrenceLocator == NULL) { return NULL; }
|
||||
PyOccurrenceCollection* pyOccurrenceCollection = NULL;
|
||||
|
||||
HTRY
|
||||
pyOccurrenceLocator->_object = occurrences.getLocator ();
|
||||
HCATCH
|
||||
Occurrences* occurrences = new Occurrences(cell->getLeafInstanceOccurrences());
|
||||
|
||||
return ( (PyObject*)pyOccurrenceLocator );
|
||||
pyOccurrenceCollection = PyObject_NEW(PyOccurrenceCollection, &PyTypeOccurrenceCollection);
|
||||
if (pyOccurrenceCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyOccurrenceCollection->_object = occurrences;
|
||||
HCATCH
|
||||
|
||||
return (PyObject*)pyOccurrenceCollection;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyCell_getLeafInstanceOccurrencesUnderLocator ()"
|
||||
// Attribute Method : "PyCell_getLeafInstanceOccurrencesUnder()"
|
||||
|
||||
static PyObject* PyCell_getLeafInstanceOccurrencesUnderLocator ( PyCell *self, PyObject* args ) {
|
||||
trace << "PyCell_getLeafInstanceOccurrencesUnderLocator ()" << endl;
|
||||
static PyObject* PyCell_getLeafInstanceOccurrencesUnder(PyCell *self, PyObject* args) {
|
||||
trace << "PyCell_getLeafInstanceOccurrencesUnder()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Cell.getLeafInstanceOccurrencesUnderLocator()" )
|
||||
METHOD_HEAD ( "Cell.getLeafInstanceOccurrencesUnder()" )
|
||||
|
||||
PyBox* arg0;
|
||||
if ( ! ParseOneArg ( "Cell.getLeafInstanceOccurencesUnderLocator", args, BOX_ARG, (PyObject**)&arg0 ) ) return ( NULL );
|
||||
if (!ParseOneArg("Cell.getLeafInstanceOccurencesUnder", args, BOX_ARG, (PyObject**)&arg0))
|
||||
return NULL;
|
||||
|
||||
PyOccurrenceLocator* pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator );
|
||||
if (pyOccurrenceLocator == NULL) { return NULL; }
|
||||
PyOccurrenceCollection* pyOccurrenceCollection = NULL;
|
||||
|
||||
HTRY
|
||||
Occurrences occurrences = cell->getLeafInstanceOccurrencesUnder ( *PYBOX_O(arg0) );
|
||||
//pyOccurrenceLocator->_object = new locator ( instances.getLocator () );
|
||||
pyOccurrenceLocator->_object = occurrences.getLocator ();
|
||||
HCATCH
|
||||
Occurrences* occurrences = new Occurrences(cell->getLeafInstanceOccurrencesUnder(*PYBOX_O(arg0)));
|
||||
|
||||
return ( (PyObject*)pyOccurrenceLocator );
|
||||
pyOccurrenceCollection = PyObject_NEW(PyOccurrenceCollection, &PyTypeOccurrenceCollection);
|
||||
if (pyOccurrenceCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyOccurrenceCollection->_object = occurrences;
|
||||
HCATCH
|
||||
|
||||
return (PyObject*)pyOccurrenceCollection;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyCell_getReferencesLocator ()"
|
||||
// Attribute Method : "PyCell_getReferences()"
|
||||
|
||||
static PyObject* PyCell_getReferencesLocator ( PyCell *self ) {
|
||||
trace << "PyCell_getReferencesLocator ()" << endl;
|
||||
static PyObject* PyCell_getReferences(PyCell *self) {
|
||||
trace << "PyCell_getReferences()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Cell.getReferencesLocator()" )
|
||||
METHOD_HEAD("Cell.getReferences()")
|
||||
|
||||
References references = cell->getReferences ();
|
||||
|
||||
PyReferenceLocator* pyReferenceLocator = PyObject_NEW ( PyReferenceLocator, &PyTypeReferenceLocator );
|
||||
if (pyReferenceLocator == NULL) { return NULL; }
|
||||
PyReferenceCollection* pyReferenceCollection = NULL;
|
||||
|
||||
HTRY
|
||||
pyReferenceLocator->_object = references.getLocator ();
|
||||
HCATCH
|
||||
References* references = new References(cell->getReferences());
|
||||
|
||||
return ( (PyObject*)pyReferenceLocator );
|
||||
pyReferenceCollection = PyObject_NEW(PyReferenceCollection, &PyTypeReferenceCollection);
|
||||
if (pyReferenceCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyReferenceCollection->_object = references;
|
||||
HCATCH
|
||||
|
||||
return (PyObject*)pyReferenceCollection;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyCell_getHyperNetsLocator ()"
|
||||
// Attribute Method : "PyCell_getHyperNets()"
|
||||
|
||||
static PyObject* PyCell_getHyperNetsLocator ( PyCell *self ) {
|
||||
trace << "PyCell_getHyperNetsLocator ()" << endl;
|
||||
static PyObject* PyCell_getHyperNets(PyCell *self) {
|
||||
trace << "PyCell_getHyperNets()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Cell.getHyperNetsLocator()" )
|
||||
METHOD_HEAD ( "Cell.getHyperNets()" )
|
||||
|
||||
Occurrences occurrences = cell->getHyperNetRootNetOccurrences();
|
||||
|
||||
PyOccurrenceLocator* pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator );
|
||||
if (pyOccurrenceLocator == NULL) { return NULL; }
|
||||
PyOccurrenceCollection* pyOccurrenceCollection = NULL;
|
||||
|
||||
HTRY
|
||||
pyOccurrenceLocator->_object = occurrences.getLocator ();
|
||||
HCATCH
|
||||
Occurrences* occurrences = new Occurrences(cell->getHyperNetRootNetOccurrences());
|
||||
|
||||
return ( (PyObject*)pyOccurrenceLocator );
|
||||
pyOccurrenceCollection = PyObject_NEW(PyOccurrenceCollection, &PyTypeOccurrenceCollection);
|
||||
if (pyOccurrenceCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyOccurrenceCollection->_object = occurrences;
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyOccurrenceCollection);
|
||||
}
|
||||
|
||||
|
||||
|
@ -367,7 +406,8 @@ extern "C" {
|
|||
METHOD_HEAD ( "Cell.getNet()" )
|
||||
|
||||
PyName* arg0;
|
||||
if ( ! ParseOneArg ( "Cell.getNet", args, NAME_ARG, (PyObject**)&arg0 ) ) return ( NULL );
|
||||
if ( ! ParseOneArg ( "Cell.getNet", args, NAME_ARG, (PyObject**)&arg0 ) )
|
||||
return NULL;
|
||||
|
||||
net = cell->getNet ( *PYNAME_O(arg0) );
|
||||
HCATCH
|
||||
|
@ -553,7 +593,8 @@ extern "C" {
|
|||
METHOD_HEAD ( "Cell.setName()" )
|
||||
|
||||
PyName* name;
|
||||
if ( ! ParseOneArg ( "Cell.setName", args, NAME_ARG, (PyObject**)&name ) ) return ( NULL );
|
||||
if ( ! ParseOneArg ( "Cell.setName", args, NAME_ARG, (PyObject**)&name ) )
|
||||
return NULL;
|
||||
cell->setName ( *PYNAME_O(name) );
|
||||
HCATCH
|
||||
|
||||
|
@ -571,7 +612,8 @@ extern "C" {
|
|||
METHOD_HEAD ( "Cell.setAbutmentBox()" )
|
||||
|
||||
PyBox* abutmentBox;
|
||||
if ( ! ParseOneArg ( "Cell.setAbutmentBox", args, BOX_ARG, (PyObject**)&abutmentBox ) ) return ( NULL );
|
||||
if ( ! ParseOneArg ( "Cell.setAbutmentBox", args, BOX_ARG, (PyObject**)&abutmentBox ) )
|
||||
return NULL;
|
||||
cell->setAbutmentBox ( *PYBOX_O(abutmentBox) );
|
||||
HCATCH
|
||||
|
||||
|
@ -589,7 +631,8 @@ extern "C" {
|
|||
METHOD_HEAD ( "Cell.setTerminal()" )
|
||||
|
||||
PyObject* arg0;
|
||||
if ( ! ParseOneArg ( "Cell.setTerminal", args, INT_ARG, (PyObject**)&arg0 ) ) return ( NULL );
|
||||
if ( ! ParseOneArg ( "Cell.setTerminal", args, INT_ARG, (PyObject**)&arg0 ) )
|
||||
return NULL;
|
||||
cell->setTerminal ( PyInt_AsLong(arg0) != 0 );
|
||||
HCATCH
|
||||
|
||||
|
@ -610,15 +653,15 @@ extern "C" {
|
|||
{ { "getLibrary" , (PyCFunction)PyCell_getLibrary , METH_NOARGS , "Returns the library owning the cell." }
|
||||
, { "getName" , (PyCFunction)PyCell_getName , METH_NOARGS , "Returns the name of the cell." }
|
||||
, { "getInstance" , (PyCFunction)PyCell_getInstance , METH_VARARGS, "Returns the instance of name <name> if it exists, else NULL." }
|
||||
, { "getInstancesLocator" , (PyCFunction)PyCell_getInstancesLocator , METH_NOARGS , "Returns the locator of the collection of all instances called by the cell." } // getInstances
|
||||
, { "getInstancesUnderLocator" , (PyCFunction)PyCell_getInstancesUnderLocator , METH_VARARGS, "Returns the locator of the collection of all instances of the cell intersecting the given rectangular area." } // getInstancesUnder
|
||||
, { "getSlaveInstancesLocator" , (PyCFunction)PyCell_getSlaveInstancesLocator , METH_NOARGS , "Returns the locator of the collection of instances whose master is this cell." } // getSlaveInstances
|
||||
, { "getOccurrencesLocator" , (PyCFunction)PyCell_getOccurrencesLocator , METH_VARARGS, "Returns the collection of all occurrences belonging to the cell." }
|
||||
, { "getOccurrencesUnderLocator", (PyCFunction)PyCell_getOccurrencesUnderLocator, METH_NOARGS , "Returns the collection of all occurrences belonging to this cell and intersecting the given rectangular area." }
|
||||
, { "getLeafInstanceOccurrencesLocator", (PyCFunction)PyCell_getLeafInstanceOccurrencesLocator, METH_VARARGS, "Returns the collection of all occurrences belonging to the cell." }
|
||||
, { "getLeafInstanceOccurrencesUnderLocator", (PyCFunction)PyCell_getLeafInstanceOccurrencesUnderLocator, METH_NOARGS , "Returns the collection of all occurrences belonging to this cell and intersecting the given rectangular area." }
|
||||
, { "getReferencesLocator" , (PyCFunction)PyCell_getReferencesLocator , METH_VARARGS, "Returns the collection of all references belonging to the cell." }
|
||||
, { "getHyperNetsLocator" , (PyCFunction)PyCell_getHyperNetsLocator , METH_VARARGS, "Returns the collection of all hyperNets belonging to the cell." }
|
||||
, { "getInstances", (PyCFunction)PyCell_getInstances, METH_NOARGS , "Returns the locator of the collection of all instances called by the cell." } // getInstances
|
||||
, { "getInstancesUnder" , (PyCFunction)PyCell_getInstancesUnder , METH_VARARGS, "Returns the locator of the collection of all instances of the cell intersecting the given rectangular area." } // getInstancesUnder
|
||||
, { "getSlaveInstances" , (PyCFunction)PyCell_getSlaveInstances , METH_NOARGS , "Returns the locator of the collection of instances whose master is this cell." } // getSlaveInstances
|
||||
, { "getOccurrences" , (PyCFunction)PyCell_getOccurrences , METH_VARARGS, "Returns the collection of all occurrences belonging to the cell." }
|
||||
, { "getOccurrencesUnder", (PyCFunction)PyCell_getOccurrencesUnder, METH_NOARGS , "Returns the collection of all occurrences belonging to this cell and intersecting the given rectangular area." }
|
||||
, { "getLeafInstanceOccurrences", (PyCFunction)PyCell_getLeafInstanceOccurrences, METH_VARARGS, "Returns the collection of all occurrences belonging to the cell." }
|
||||
, { "getLeafInstanceOccurrencesUnder", (PyCFunction)PyCell_getLeafInstanceOccurrencesUnder, METH_NOARGS , "Returns the collection of all occurrences belonging to this cell and intersecting the given rectangular area." }
|
||||
, { "getReferences" , (PyCFunction)PyCell_getReferences , METH_VARARGS, "Returns the collection of all references belonging to the cell." }
|
||||
, { "getHyperNets" , (PyCFunction)PyCell_getHyperNets , METH_VARARGS, "Returns the collection of all hyperNets belonging to the cell." }
|
||||
, { "getNet" , (PyCFunction)PyCell_getNet , METH_VARARGS, "Returns the net of name <name> if it exists, else NULL." }
|
||||
, { "getNets" , (PyCFunction)PyCell_getNets , METH_NOARGS , "Returns the collection of all nets of the cell." }
|
||||
, { "getExternalNets", (PyCFunction)PyCell_getExternalNets, METH_NOARGS , "Returns the collection of all external nets of the cell." }
|
||||
|
|
|
@ -1,148 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PyCellLocator.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyCellLocator.h"
|
||||
#include "hurricane/isobar/PyCell.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
using namespace Hurricane;
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
# define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Locator<Cell*>,locator,function)
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyCellLocator" Python Module Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
# if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyCellLocator" Attribute Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
// Standart Accessors (Attributes).
|
||||
|
||||
|
||||
// Standart Predicates (Attributes).
|
||||
DirectGetBoolAttribute(PyCellLocator_isValid,isValid,PyCellLocator,Locator<Cell*>)
|
||||
|
||||
|
||||
// Standart Locator Accessors (Attributes).
|
||||
LocatorProgressAttribute(Cell)
|
||||
LocatorGetElementAttribute(Cell)
|
||||
LocatorGetCloneAttribute(Cell)
|
||||
|
||||
|
||||
// Standard destroy (Attribute).
|
||||
DirectDestroyAttribute(PyCellLocator_destroy, PyCellLocator)
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyCellLocator Attribute Method table.
|
||||
|
||||
PyMethodDef PyCellLocator_Methods[] =
|
||||
{ { "isValid" , (PyCFunction)PyCellLocator_isValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." }
|
||||
, { "progress" , (PyCFunction)PyCellLocator_progress , METH_NOARGS , "Moves forward the locator to the following element." }
|
||||
, { "getElement" , (PyCFunction)PyCellLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." }
|
||||
, { "getClone" , (PyCFunction)PyCellLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." }
|
||||
, { "destroy" , (PyCFunction)PyCellLocator_destroy , METH_NOARGS
|
||||
, "Destroy associated hurricane object, the python object remains." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyCellLocator" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
DirectDeleteMethod(PyCellLocator_DeAlloc,PyCellLocator)
|
||||
LocatorPyTypeObjectLinkPyType(Cell, Cell*)
|
||||
|
||||
|
||||
|
||||
|
||||
# else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyCellLocator" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyCellLocator Object Definitions.
|
||||
PyTypeObjectDefinitions(CellLocator)
|
||||
|
||||
# endif // End of Shared Library Code Part.
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
|
@ -1,140 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Damien.Dupuis@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PyNetLocator.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyComponentLocator.h"
|
||||
#include "hurricane/isobar/PyComponent.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
using namespace Hurricane;
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
# define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Locator<Component*>,locator,function)
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyComponentLocator" Python Module Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
# if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyComponentLocator" Attribute Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
// Standart Accessors (Attributes).
|
||||
|
||||
// Standart Predicates (Attributes).
|
||||
DirectGetBoolAttribute(PyComponentLocator_isValid,isValid,PyComponentLocator,Locator<Component*>)
|
||||
|
||||
|
||||
// Standart Locator Accessors (Attributes).
|
||||
LocatorProgressAttribute(Component)
|
||||
LocatorGetElementEntityAttribute(Component)
|
||||
LocatorGetCloneAttribute(Component)
|
||||
|
||||
// Standart Delete (Attribute).
|
||||
DirectDestroyAttribute(PyComponentLocator_destroy, PyComponentLocator)
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyComponent Attribute Method table.
|
||||
|
||||
PyMethodDef PyComponentLocator_Methods[] =
|
||||
{ { "isValid" , (PyCFunction)PyComponentLocator_isValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." }
|
||||
, { "progress" , (PyCFunction)PyComponentLocator_progress , METH_NOARGS , "Moves forward the locator to the following element." }
|
||||
, { "getElement" , (PyCFunction)PyComponentLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." }
|
||||
, { "getClone" , (PyCFunction)PyComponentLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." }
|
||||
, { "destroy" , (PyCFunction)PyComponentLocator_destroy , METH_NOARGS
|
||||
, "Destroy associated hurricane object, the python object remains." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyComponentLocator" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
DirectDeleteMethod(PyComponentLocator_DeAlloc,PyComponentLocator)
|
||||
LocatorPyTypeObjectLinkPyType(Component, Component*)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyComponentLocator" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyComponentLocator Object Definitions.
|
||||
PyTypeObjectDefinitions(ComponentLocator)
|
||||
|
||||
|
||||
# endif // End of Shared Library Code Part.
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
|
@ -63,30 +63,29 @@
|
|||
#include "hurricane/isobar/PyLibrary.h"
|
||||
#include "hurricane/isobar/PyEntity.h"
|
||||
#include "hurricane/isobar/PyCell.h"
|
||||
#include "hurricane/isobar/PyCellCollection.h"
|
||||
#include "hurricane/isobar/PyLayer.h"
|
||||
#include "hurricane/isobar/PyPin.h"
|
||||
#include "hurricane/isobar/PyPinCollection.h"
|
||||
#include "hurricane/isobar/PyInstance.h"
|
||||
#include "hurricane/isobar/PyInstanceCollection.h"
|
||||
#include "hurricane/isobar/PyReference.h"
|
||||
#include "hurricane/isobar/PyReferenceCollection.h"
|
||||
#include "hurricane/isobar/PyNet.h"
|
||||
#include "hurricane/isobar/PyNetCollection.h"
|
||||
#include "hurricane/isobar/PyHyperNet.h"
|
||||
#include "hurricane/isobar/PyComponent.h"
|
||||
#include "hurricane/isobar/PyComponentCollection.h"
|
||||
#include "hurricane/isobar/PyPlug.h"
|
||||
#include "hurricane/isobar/PyPlugCollection.h"
|
||||
#include "hurricane/isobar/PySegment.h"
|
||||
#include "hurricane/isobar/PySegmentCollection.h"
|
||||
#include "hurricane/isobar/PyContact.h"
|
||||
#include "hurricane/isobar/PyHorizontal.h"
|
||||
#include "hurricane/isobar/PyVertical.h"
|
||||
#include "hurricane/isobar/PyPath.h"
|
||||
#include "hurricane/isobar/PyOccurrence.h"
|
||||
#include "hurricane/isobar/PyInstanceLocator.h"
|
||||
#include "hurricane/isobar/PyPlugLocator.h"
|
||||
#include "hurricane/isobar/PyPinLocator.h"
|
||||
#include "hurricane/isobar/PySegmentLocator.h"
|
||||
#include "hurricane/isobar/PyComponentLocator.h"
|
||||
#include "hurricane/isobar/PyOccurrenceLocator.h"
|
||||
#include "hurricane/isobar/PyNetLocator.h"
|
||||
#include "hurricane/isobar/PyNetCollection.h"
|
||||
#include "hurricane/isobar/PyCellLocator.h"
|
||||
#include "hurricane/isobar/PyReferenceLocator.h"
|
||||
#include "hurricane/isobar/PyOccurrenceCollection.h"
|
||||
#include "hurricane/isobar/PyTechnology.h"
|
||||
#include "hurricane/NetExternalComponents.h"
|
||||
|
||||
|
@ -479,20 +478,20 @@ extern "C" {
|
|||
PyObject* arg0;
|
||||
if ( ! ParseOneArg ( "getExternalComponents", args, ":ent", &arg0) ) return ( NULL );
|
||||
|
||||
PyComponentLocator* pyComponentLocator = NULL;
|
||||
PyComponentCollection* pyComponentCollection = NULL;
|
||||
|
||||
HTRY
|
||||
|
||||
Components components = NetExternalComponents::get( PYNET_O ( arg0 ) );
|
||||
Components* components = new Components(NetExternalComponents::get(PYNET_O(arg0)));
|
||||
|
||||
pyComponentLocator = PyObject_NEW ( PyComponentLocator, &PyTypeComponentLocator );
|
||||
if (pyComponentLocator == NULL) { return NULL; }
|
||||
pyComponentCollection = PyObject_NEW(PyComponentCollection, &PyTypeComponentCollection);
|
||||
if (pyComponentCollection == NULL) { return NULL; }
|
||||
|
||||
pyComponentLocator->_object = components.getLocator ();
|
||||
pyComponentCollection->_object = components;
|
||||
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyComponentLocator );
|
||||
return ((PyObject*)pyComponentCollection);
|
||||
}
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
|
@ -533,16 +532,16 @@ extern "C" {
|
|||
PyLayer_LinkPyType ();
|
||||
PyPath_LinkPyType ();
|
||||
PyOccurrence_LinkPyType ();
|
||||
PyInstanceLocator_LinkPyType ();
|
||||
PyPlugLocator_LinkPyType ();
|
||||
PyNetLocator_LinkPyType ();
|
||||
PyInstanceCollection_LinkPyType ();
|
||||
PyPlugCollection_LinkPyType ();
|
||||
PyNetCollection_LinkPyType ();
|
||||
PyCellLocator_LinkPyType ();
|
||||
PyPinLocator_LinkPyType ();
|
||||
PySegmentLocator_LinkPyType ();
|
||||
PyOccurrenceLocator_LinkPyType ();
|
||||
PyComponentLocator_LinkPyType ();
|
||||
PyReferenceLocator_LinkPyType ();
|
||||
PyNetCollection_LinkPyType ();
|
||||
PyCellCollection_LinkPyType ();
|
||||
PyPinCollection_LinkPyType ();
|
||||
PySegmentCollection_LinkPyType ();
|
||||
PyOccurrenceCollection_LinkPyType ();
|
||||
PyComponentCollection_LinkPyType ();
|
||||
PyReferenceCollection_LinkPyType ();
|
||||
PyCell_LinkPyType ();
|
||||
PyInstance_LinkPyType ();
|
||||
PyReference_LinkPyType ();
|
||||
|
@ -575,29 +574,36 @@ extern "C" {
|
|||
PyPath_Constructor();
|
||||
PyOccurrence_Constructor();
|
||||
|
||||
PYTYPE_READY ( Point )
|
||||
PYTYPE_READY ( Box )
|
||||
PYTYPE_READY ( Transformation )
|
||||
PYTYPE_READY ( Name )
|
||||
PYTYPE_READY ( DataBase )
|
||||
PYTYPE_READY ( Technology )
|
||||
PYTYPE_READY ( Library )
|
||||
PYTYPE_READY ( Entity )
|
||||
PYTYPE_READY ( Layer )
|
||||
PYTYPE_READY ( Path )
|
||||
PYTYPE_READY ( Occurrence )
|
||||
PYTYPE_READY ( InstanceLocator )
|
||||
PYTYPE_READY ( PlugLocator )
|
||||
PYTYPE_READY ( NetLocator )
|
||||
PYTYPE_READY ( NetCollection )
|
||||
PYTYPE_READY ( NetCollectionLocator )
|
||||
PYTYPE_READY ( CellLocator )
|
||||
PYTYPE_READY ( PinLocator )
|
||||
PYTYPE_READY ( SegmentLocator )
|
||||
PYTYPE_READY ( ComponentLocator )
|
||||
PYTYPE_READY ( OccurrenceLocator)
|
||||
PYTYPE_READY ( ReferenceLocator )
|
||||
PYTYPE_READY ( HyperNet )
|
||||
PYTYPE_READY ( Point )
|
||||
PYTYPE_READY ( Box )
|
||||
PYTYPE_READY ( Transformation )
|
||||
PYTYPE_READY ( Name )
|
||||
PYTYPE_READY ( DataBase )
|
||||
PYTYPE_READY ( Technology )
|
||||
PYTYPE_READY ( Library )
|
||||
PYTYPE_READY ( Entity )
|
||||
PYTYPE_READY ( Layer )
|
||||
PYTYPE_READY ( Path )
|
||||
PYTYPE_READY ( Occurrence )
|
||||
PYTYPE_READY ( InstanceCollection )
|
||||
PYTYPE_READY ( InstanceCollectionLocator )
|
||||
PYTYPE_READY ( PlugCollection )
|
||||
PYTYPE_READY ( PlugCollectionLocator )
|
||||
PYTYPE_READY ( NetCollection )
|
||||
PYTYPE_READY ( NetCollectionLocator )
|
||||
PYTYPE_READY ( CellCollection )
|
||||
PYTYPE_READY ( CellCollectionLocator )
|
||||
PYTYPE_READY ( PinCollection )
|
||||
PYTYPE_READY ( PinCollectionLocator )
|
||||
PYTYPE_READY ( SegmentCollection )
|
||||
PYTYPE_READY ( SegmentCollectionLocator )
|
||||
PYTYPE_READY ( ComponentCollection )
|
||||
PYTYPE_READY ( ComponentCollectionLocator )
|
||||
PYTYPE_READY ( OccurrenceCollection )
|
||||
PYTYPE_READY ( OccurrenceCollectionLocator )
|
||||
PYTYPE_READY ( ReferenceCollection )
|
||||
PYTYPE_READY ( ReferenceCollectionLocator )
|
||||
PYTYPE_READY ( HyperNet )
|
||||
|
||||
PYTYPE_READY_SUB ( Cell , Entity )
|
||||
PYTYPE_READY_SUB ( Instance , Entity )
|
||||
|
@ -617,9 +623,9 @@ extern "C" {
|
|||
__cs.AddType ( "box" , &PyTypeBox , "<Box>" , false );
|
||||
__cs.AddType ( "ent" , &PyTypeEntity , "<Entity>" , false );
|
||||
__cs.AddType ( "cell" , &PyTypeCell , "<Cell>" , false, "ent" );
|
||||
__cs.AddType ( "cellLoc" , &PyTypeCellLocator , "<CellLocator>" , false );
|
||||
__cs.AddType ( "cellCol" , &PyTypeCellCollection , "<CellCollection>" , false );
|
||||
__cs.AddType ( "comp" , &PyTypeComponent , "<Component>" , false, "ent" );
|
||||
__cs.AddType ( "compLoc" , &PyTypeComponentLocator , "<ComponentLocator>" , false );
|
||||
__cs.AddType ( "compCol" , &PyTypeComponentCollection, "<ComponentCollection>" , false );
|
||||
__cs.AddType ( "contact" , &PyTypeContact , "<Contact>" , false, "comp" );
|
||||
// Do not change the "none" string. It's hardwired to the None object.
|
||||
__cs.AddType ( "none" , Py_None->ob_type , "<None>" , true );
|
||||
|
@ -632,30 +638,29 @@ extern "C" {
|
|||
__cs.AddType ( "function" , NULL , "<Function>" , true );
|
||||
__cs.AddType ( "horiz" , &PyTypeHorizontal , "<Horizontal>" , false, "segment" );
|
||||
__cs.AddType ( "inst" , &PyTypeInstance , "<Instance>" , false, "ent" );
|
||||
__cs.AddType ( "instLoc" , &PyTypeInstanceLocator , "<InstanceLocator>" , false );
|
||||
__cs.AddType ( "instCol" , &PyTypeInstanceCollection, "<InstanceCollection>" , false );
|
||||
__cs.AddType ( "layer" , &PyTypeLayer , "<Layer>" , false );
|
||||
__cs.AddType ( "library" , &PyTypeLibrary , "<Library>" , false );
|
||||
__cs.AddType ( "name" , &PyTypeName , "<Name>" , false );
|
||||
__cs.AddType ( "ref" , &PyTypeReference , "<Reference>" , false, "ent" );
|
||||
__cs.AddType ( "refLoc" , &PyTypeReferenceLocator , "<ReferenceLocator>" , false );
|
||||
__cs.AddType ( "refCol" , &PyTypeReferenceCollection, "<ReferenceCollection>" , false );
|
||||
__cs.AddType ( "net" , &PyTypeNet , "<Net>" , false, "ent" );
|
||||
__cs.AddType ( "netLoc" , &PyTypeNetLocator , "<NetLocator>" , false );
|
||||
__cs.AddType ( "netCol" , &PyTypeNetCollection , "<NetCollection>" , false );
|
||||
__cs.AddType ( "hyperNet" , &PyTypeHyperNet , "<HyperNet>" , false );
|
||||
__cs.AddType ( "pin" , &PyTypePin , "<Pin>" , false, "contact" );
|
||||
__cs.AddType ( "pinLoc" , &PyTypePinLocator , "<PinLocator>" , false );
|
||||
__cs.AddType ( "pinCol" , &PyTypePinCollection , "<PinCollection>" , false );
|
||||
__cs.AddType ( "plug" , &PyTypePlug , "<Plug>" , false, "comp" );
|
||||
__cs.AddType ( "plugLoc" , &PyTypePlugLocator , "<PlugLocator>" , false );
|
||||
__cs.AddType ( "plugCol" , &PyTypePlugCollection , "<PlugCollection>" , false );
|
||||
__cs.AddType ( "point" , &PyTypePoint , "<Point>" , false );
|
||||
__cs.AddType ( "segment" , &PyTypeSegment , "<Segment>" , false, "comp" );
|
||||
__cs.AddType ( "segmentLoc" , &PyTypeSegmentLocator , "<SegmentLocator>" , false );
|
||||
__cs.AddType ( "segmentCol" , &PyTypeSegmentCollection, "<SegmentCollection>", false );
|
||||
__cs.AddType ( "db" , &PyTypeDataBase , "<DataBase>" , false );
|
||||
__cs.AddType ( "techno" , &PyTypeTechnology , "<Technology>" , false );
|
||||
__cs.AddType ( "transfo" , &PyTypeTransformation , "<Transformation>" , false );
|
||||
__cs.AddType ( "vert" , &PyTypeVertical , "<Vertical>" , false, "segment" );
|
||||
__cs.AddType ( "path" , &PyTypePath , "<Path>" , false );
|
||||
__cs.AddType ( "occur" , &PyTypeOccurrence , "<Occurrence>" , false );
|
||||
__cs.AddType ( "occurLoc" , &PyTypeOccurrenceLocator, "<OccurrenceLocator>", false );
|
||||
__cs.AddType ( "occurCol" , &PyTypeOccurrenceCollection, "<OccurrenceCollection>", false );
|
||||
|
||||
|
||||
PyObject* module = Py_InitModule ( "Hurricane", PyHurricane_Methods );
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#include "hurricane/isobar/PyHyperNet.h"
|
||||
#include "hurricane/isobar/PyCell.h"
|
||||
#include "hurricane/isobar/PyOccurrence.h"
|
||||
#include "hurricane/isobar/PyOccurrenceLocator.h"
|
||||
#include "hurricane/isobar/PyOccurrenceCollection.h"
|
||||
|
||||
using namespace Hurricane;
|
||||
|
||||
|
@ -96,30 +96,28 @@ extern "C" {
|
|||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyHyperNet_getPlugsLocator ()"
|
||||
// Attribute Method : "PyHyperNet_getLeafPlugOccurrences()"
|
||||
|
||||
static PyObject* PyHyperNet_getLeafPlugOccurrenceLocator ( PyHyperNet *self )
|
||||
static PyObject* PyHyperNet_getLeafPlugOccurrences(PyHyperNet *self)
|
||||
{
|
||||
trace << "PyHyperNet_getLeafPlugOccurrenceLocator ()" << endl;
|
||||
trace << "PyHyperNet_getLeafPlugOccurrences()" << endl;
|
||||
|
||||
METHOD_HEAD ( "HyperNet.getLeafPlugOccurrenceLocator()" )
|
||||
METHOD_HEAD ( "HyperNet.getLeafPlugOccurrences()" )
|
||||
|
||||
Occurrences occurrences = hyperNet->getLeafPlugOccurrences ();
|
||||
|
||||
PyOccurrenceLocator* pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator );
|
||||
if (pyOccurrenceLocator == NULL) { return NULL; }
|
||||
|
||||
trace_in ();
|
||||
trace << "new PyOccurrenceLocator [" << hex << pyOccurrenceLocator << "]" << endl;
|
||||
trace_out ();
|
||||
PyOccurrenceCollection* pyOccurrenceCollection = NULL;
|
||||
|
||||
HTRY
|
||||
Occurrences* occurrences = new Occurrences(hyperNet->getLeafPlugOccurrences());
|
||||
|
||||
pyOccurrenceLocator->_object = occurrences.getLocator ();
|
||||
pyOccurrenceCollection = PyObject_NEW(PyOccurrenceCollection, &PyTypeOccurrenceCollection);
|
||||
if (pyOccurrenceCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyOccurrenceCollection->_object = occurrences;
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyOccurrenceLocator );
|
||||
|
||||
return (PyObject*)pyOccurrenceCollection;
|
||||
}
|
||||
|
||||
|
||||
|
@ -150,7 +148,7 @@ extern "C" {
|
|||
PyMethodDef PyHyperNet_Methods[] =
|
||||
{ { "getCell" , (PyCFunction)PyHyperNet_getCell , METH_NOARGS , "Returns the hyperNet cell." }
|
||||
, { "isValid" , (PyCFunction)PyHyperNet_isValid , METH_NOARGS , "Returns trus if the HyperNet isValid." }
|
||||
, { "getLeafPlugOccurrenceLocator", (PyCFunction)PyHyperNet_getLeafPlugOccurrenceLocator, METH_NOARGS
|
||||
, { "getLeafPlugOccurrences", (PyCFunction)PyHyperNet_getLeafPlugOccurrences, METH_NOARGS
|
||||
, "Returns the collection of leaf occurrences" }
|
||||
, { "destroy" , (PyCFunction)PyHyperNet_destroy , METH_NOARGS
|
||||
, "Destroy associated hurricane object, the python object remains." }
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
#include "hurricane/isobar/PyInstance.h"
|
||||
#include "hurricane/isobar/PyNet.h"
|
||||
#include "hurricane/isobar/PyPlug.h"
|
||||
#include "hurricane/isobar/PyPlugLocator.h"
|
||||
#include "hurricane/isobar/PyPlugCollection.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
@ -245,79 +245,80 @@ extern "C" {
|
|||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyInstance_getPlugsLocator ()"
|
||||
// Attribute Method : "PyInstance_getPlugs()"
|
||||
|
||||
static PyObject* PyInstance_getPlugsLocator ( PyInstance *self ) {
|
||||
trace << "PyInstance_getPlugsLocator ()" << endl;
|
||||
METHOD_HEAD ( "Instance.getPlugsLocator()" )
|
||||
static PyObject* PyInstance_getPlugs(PyInstance *self ) {
|
||||
trace << "PyInstance_getPlugs()" << endl;
|
||||
|
||||
PyPlugLocator* pyPlugLocator = NULL;
|
||||
METHOD_HEAD ( "Instance.getPlugs()" )
|
||||
|
||||
PyPlugCollection* pyPlugCollection = NULL;
|
||||
|
||||
HTRY
|
||||
Plugs plugs = instance->getPlugs ();
|
||||
Plugs* plugs = new Plugs(instance->getPlugs());
|
||||
|
||||
pyPlugLocator = PyObject_NEW ( PyPlugLocator, &PyTypePlugLocator );
|
||||
if (pyPlugLocator == NULL) { return NULL; }
|
||||
|
||||
pyPlugLocator->_object = plugs.getLocator ();
|
||||
pyPlugCollection = PyObject_NEW(PyPlugCollection, &PyTypePlugCollection);
|
||||
if (pyPlugCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyPlugCollection->_object = plugs;
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyPlugLocator );
|
||||
|
||||
return (PyObject*)pyPlugCollection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyInstance_getConnectedPlugsLocator ()"
|
||||
// Attribute Method : "PyInstance_getConnectedPlugs()"
|
||||
|
||||
static PyObject* PyInstance_getConnectedPlugsLocator ( PyInstance *self )
|
||||
{
|
||||
trace << "PyInstance_getConnectedPlugsLocator ()" << endl;
|
||||
METHOD_HEAD ( "Instance.getConnectedPlugsLocator()" )
|
||||
static PyObject* PyInstance_getConnectedPlugs(PyInstance *self) {
|
||||
trace << "PyInstance_getConnectedPlugs ()" << endl;
|
||||
|
||||
PyPlugLocator* pyPlugLocator = NULL;
|
||||
METHOD_HEAD ( "Instance.getConnectedPlugs()")
|
||||
|
||||
PyPlugCollection* pyPlugCollection = NULL;
|
||||
|
||||
HTRY
|
||||
Plugs plugs = instance->getConnectedPlugs ();
|
||||
Plugs* plugs = new Plugs(instance->getConnectedPlugs());
|
||||
|
||||
pyPlugLocator = PyObject_NEW ( PyPlugLocator, &PyTypePlugLocator );
|
||||
if (pyPlugLocator == NULL) { return NULL; }
|
||||
|
||||
pyPlugLocator->_object = plugs.getLocator ();
|
||||
pyPlugCollection = PyObject_NEW(PyPlugCollection, &PyTypePlugCollection);
|
||||
if (pyPlugCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyPlugCollection->_object = plugs;
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyPlugLocator );
|
||||
|
||||
return (PyObject*)pyPlugCollection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyInstance_getUnconnectedPlugsLocator ()"
|
||||
|
||||
static PyObject* PyInstance_getUnconnectedPlugsLocator ( PyInstance *self )
|
||||
{
|
||||
trace << "PyInstance_getUnconnectedPlugsLocator ()" << endl;
|
||||
METHOD_HEAD ( "Instance.getUnconnectedPlugsLocator()" )
|
||||
static PyObject* PyInstance_getUnconnectedPlugs(PyInstance *self) {
|
||||
trace << "PyInstance_getUnconnectedPlugs ()" << endl;
|
||||
|
||||
PyPlugLocator* pyPlugLocator = NULL;
|
||||
METHOD_HEAD ( "Instance.getUnconnectedPlugs()")
|
||||
|
||||
PyPlugCollection* pyPlugCollection = NULL;
|
||||
|
||||
HTRY
|
||||
Plugs plugs = instance->getUnconnectedPlugs ();
|
||||
Plugs* plugs = new Plugs(instance->getUnconnectedPlugs());
|
||||
|
||||
pyPlugLocator = PyObject_NEW ( PyPlugLocator, &PyTypePlugLocator );
|
||||
if (pyPlugLocator == NULL) { return NULL; }
|
||||
|
||||
pyPlugLocator->_object = plugs.getLocator ();
|
||||
pyPlugCollection = PyObject_NEW(PyPlugCollection, &PyTypePlugCollection);
|
||||
if (pyPlugCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyPlugCollection->_object = plugs;
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyPlugLocator );
|
||||
|
||||
return (PyObject*)pyPlugCollection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyInstance_getAbutmentBox ()"
|
||||
|
||||
|
@ -411,9 +412,9 @@ extern "C" {
|
|||
, { "getTransformation" , (PyCFunction)PyInstance_getTransformation , METH_NOARGS , "Returns the transformation associated to the instance." }
|
||||
, { "getPlacementStatus" , (PyCFunction)PyInstance_getPlacementStatus , METH_NOARGS , "Returns the placement status of the instance." }
|
||||
, { "getPlug" , (PyCFunction)PyInstance_getPlug , METH_VARARGS, "Returns the plug associated to the <masterNet> if it exists or else NULL (if the net is not external)." }
|
||||
, { "getPlugsLocator" , (PyCFunction)PyInstance_getPlugsLocator , METH_NOARGS , "Returns the collection of instance plugs." }
|
||||
, { "getConnectedPlugsLocator" , (PyCFunction)PyInstance_getConnectedPlugsLocator , METH_NOARGS , "Returns the collection of instance plugs which are effectively connected." }
|
||||
, { "getUnconnectedPlugsLocator", (PyCFunction)PyInstance_getUnconnectedPlugsLocator, METH_NOARGS , "Returns the collection of instance plugs which are not connected." }
|
||||
, { "getPlugs" , (PyCFunction)PyInstance_getPlugs , METH_NOARGS , "Returns the collection of instance plugs." }
|
||||
, { "getConnectedPlugs" , (PyCFunction)PyInstance_getConnectedPlugs , METH_NOARGS , "Returns the collection of instance plugs which are effectively connected." }
|
||||
, { "getUnconnectedPlugs", (PyCFunction)PyInstance_getUnconnectedPlugs, METH_NOARGS , "Returns the collection of instance plugs which are not connected." }
|
||||
, { "getAbutmentBox" , (PyCFunction)PyInstance_getAbutmentBox , METH_NOARGS , "Returns the abutment box of the instance, that is the abutment box of the master cell to which has been applied the instance transformation." }
|
||||
, { "isTerminal" , (PyCFunction)PyInstance_isTerminal , METH_NOARGS , "Returns true if the instance is a terminal instance." }
|
||||
, { "isLeaf" , (PyCFunction)PyInstance_isLeaf , METH_NOARGS , "Returns true if the instance is a leaf instance." }
|
||||
|
|
|
@ -1,149 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id: PyInstanceLocator.cpp,v 1.12 2006/09/22 11:27:31 tsunami Exp $
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PyInstanceLocator.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyInstanceLocator.h"
|
||||
#include "hurricane/isobar/PyInstance.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
using namespace Hurricane;
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
# define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Locator<Instance*>,locator,function)
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyInstanceLocator" Python Module Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
# if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyInstanceLocator" Attribute Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
// Standart Accessors (Attributes).
|
||||
|
||||
|
||||
// Standart Predicates (Attributes).
|
||||
DirectGetBoolAttribute(PyInstanceLocator_isValid,isValid,PyInstanceLocator,Locator<Instance*>)
|
||||
|
||||
|
||||
// Standart Locator Accessors (Attributes).
|
||||
LocatorProgressAttribute(Instance)
|
||||
LocatorGetElementAttribute(Instance)
|
||||
LocatorGetCloneAttribute(Instance)
|
||||
|
||||
|
||||
// Standart destroy (Attribute).
|
||||
DirectDestroyAttribute(PyInstanceLocator_destroy, PyInstanceLocator)
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyInstanceLocator Attribute Method table.
|
||||
|
||||
PyMethodDef PyInstanceLocator_Methods[] =
|
||||
{ { "isValid" , (PyCFunction)PyInstanceLocator_isValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." }
|
||||
, { "progress" , (PyCFunction)PyInstanceLocator_progress , METH_NOARGS , "Moves forward the locator to the following element." }
|
||||
, { "getElement" , (PyCFunction)PyInstanceLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." }
|
||||
, { "getClone" , (PyCFunction)PyInstanceLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." }
|
||||
, { "destroy" , (PyCFunction)PyInstanceLocator_destroy , METH_NOARGS
|
||||
, "Destroy associated hurricane object, the python object remains." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyInstanceLocator" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
DirectDeleteMethod(PyInstanceLocator_DeAlloc,PyInstanceLocator)
|
||||
LocatorPyTypeObjectLinkPyType(Instance, Instance*)
|
||||
|
||||
|
||||
|
||||
|
||||
# else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyInstanceLocator" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyInstanceLocator Object Definitions.
|
||||
PyTypeObjectDefinitions(InstanceLocator)
|
||||
|
||||
|
||||
|
||||
# endif // End of Shared Library Code Part.
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
#include "hurricane/isobar/PyName.h"
|
||||
#include "hurricane/isobar/PyLibrary.h"
|
||||
#include "hurricane/isobar/PyCell.h"
|
||||
#include "hurricane/isobar/PyCellLocator.h"
|
||||
#include "hurricane/isobar/PyCellCollection.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
@ -124,25 +124,29 @@ extern "C" {
|
|||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyLibrary_getCellsLocator ()"
|
||||
// Attribute Method : "PyLibrary_getCells()"
|
||||
|
||||
static PyObject* PyLibrary_getCellsLocator ( PyLibrary *self ) {
|
||||
trace << "PyLibrary_getCellsLocator ()" << endl;
|
||||
METHOD_HEAD ( "Library.getCellsLocator()" )
|
||||
static PyObject* PyLibrary_getCells(PyLibrary *self) {
|
||||
trace << "PyLibrary_getCells()" << endl;
|
||||
|
||||
Cells cells = lib->getCells ();
|
||||
METHOD_HEAD ( "Library.getCells()" )
|
||||
|
||||
PyCellLocator* pyCellLocator = PyObject_NEW ( PyCellLocator, &PyTypeCellLocator );
|
||||
if (pyCellLocator == NULL) { return NULL; }
|
||||
PyCellCollection* pyCellCollection = NULL;
|
||||
|
||||
HTRY
|
||||
pyCellLocator->_object = cells.getLocator ();
|
||||
Cells* cells = new Cells(lib->getCells ());
|
||||
|
||||
pyCellCollection = PyObject_NEW(PyCellCollection, &PyTypeCellCollection);
|
||||
if (pyCellCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyCellCollection->_object = cells;
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyCellLocator );
|
||||
|
||||
return (PyObject*)pyCellCollection;
|
||||
}
|
||||
|
||||
|
||||
// Standart Accessors (Attributes).
|
||||
|
||||
|
||||
|
@ -156,7 +160,7 @@ extern "C" {
|
|||
{
|
||||
{ "getName" , (PyCFunction)PyLibrary_getName , METH_NOARGS , "Returns the name of the library." }
|
||||
, { "getCell" , (PyCFunction)PyLibrary_getCell , METH_VARARGS, "Get the cell of name <name>" }
|
||||
, { "getCellsLocator", (PyCFunction)PyLibrary_getCellsLocator, METH_NOARGS , "Returns the collection of all cells of the library." }
|
||||
, { "getCells", (PyCFunction)PyLibrary_getCells, METH_NOARGS , "Returns the collection of all cells of the library." }
|
||||
, { "destroy" , (PyCFunction)PyLibrary_destroy , METH_NOARGS
|
||||
, "Destroy associated hurricane object The python object remains." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
|
|
|
@ -56,10 +56,10 @@
|
|||
#include "hurricane/isobar/PyName.h"
|
||||
#include "hurricane/isobar/PyCell.h"
|
||||
#include "hurricane/isobar/PyPoint.h"
|
||||
#include "hurricane/isobar/PyPlugLocator.h"
|
||||
#include "hurricane/isobar/PySegmentLocator.h"
|
||||
#include "hurricane/isobar/PyComponentLocator.h"
|
||||
#include "hurricane/isobar/PyPinLocator.h"
|
||||
#include "hurricane/isobar/PyPlugCollection.h"
|
||||
#include "hurricane/isobar/PySegmentCollection.h"
|
||||
#include "hurricane/isobar/PyComponentCollection.h"
|
||||
#include "hurricane/isobar/PyPinCollection.h"
|
||||
|
||||
#include "hurricane/NetExternalComponents.h"
|
||||
using namespace Hurricane;
|
||||
|
@ -72,23 +72,23 @@ namespace Isobar {
|
|||
extern "C" {
|
||||
|
||||
|
||||
# undef ACCESS_OBJECT
|
||||
# undef ACCESS_CLASS
|
||||
# define ACCESS_OBJECT _baseObject._object
|
||||
# define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject)
|
||||
# define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Net,net,function)
|
||||
#undef ACCESS_OBJECT
|
||||
#undef ACCESS_CLASS
|
||||
#define ACCESS_OBJECT _baseObject._object
|
||||
#define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject)
|
||||
#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Net,net,function)
|
||||
|
||||
# define LOAD_CONSTANT(CONSTANT_VALUE,CONSTANT_NAME) \
|
||||
constant = PyInt_FromLong ( (long)CONSTANT_VALUE ); \
|
||||
PyDict_SetItemString ( dictionnary, CONSTANT_NAME, constant ); \
|
||||
Py_DECREF ( constant );
|
||||
#define LOAD_CONSTANT(CONSTANT_VALUE,CONSTANT_NAME) \
|
||||
constant = PyInt_FromLong ( (long)CONSTANT_VALUE ); \
|
||||
PyDict_SetItemString ( dictionnary, CONSTANT_NAME, constant ); \
|
||||
Py_DECREF ( constant );
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyNet" Python Module Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
# if defined(__PYTHON_MODULE__)
|
||||
#if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
|
@ -136,8 +136,7 @@ extern "C" {
|
|||
// | Global Constants Loading |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
extern void NetLoadConstants ( PyObject* dictionnary )
|
||||
{
|
||||
extern void NetLoadConstants ( PyObject* dictionnary ) {
|
||||
PyObject* constant;
|
||||
|
||||
LOAD_CONSTANT ( Net::Type::UNDEFINED , "TypeUNDEFINED" )
|
||||
|
@ -235,113 +234,101 @@ extern "C" {
|
|||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyNet_getPlugsLocator ()"
|
||||
// Attribute Method : "PyNet_getPlugs()"
|
||||
|
||||
static PyObject* PyNet_getPlugsLocator ( PyNet *self )
|
||||
{
|
||||
trace << "PyNet_getPlugsLocator ()" << endl;
|
||||
static PyObject* PyNet_getPlugs(PyNet *self) {
|
||||
trace << "PyNet_getPlugs()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Net.getPlugsLocator()" )
|
||||
|
||||
Plugs plugs = net->getPlugs ();
|
||||
|
||||
PyPlugLocator* pyPlugLocator = PyObject_NEW ( PyPlugLocator, &PyTypePlugLocator );
|
||||
if (pyPlugLocator == NULL) { return NULL; }
|
||||
|
||||
trace_in ();
|
||||
trace << "new PyPlugLocator [" << hex << pyPlugLocator << "]" << endl;
|
||||
trace_out ();
|
||||
METHOD_HEAD("Net.getPlugs()")
|
||||
|
||||
PyPlugCollection* pyPlugCollection = NULL;
|
||||
|
||||
HTRY
|
||||
Plugs* plugs = new Plugs(net->getPlugs());
|
||||
|
||||
pyPlugLocator->_object = plugs.getLocator ();
|
||||
pyPlugCollection = PyObject_NEW(PyPlugCollection, &PyTypePlugCollection);
|
||||
if (pyPlugCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyPlugCollection->_object = plugs;
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyPlugLocator );
|
||||
|
||||
return (PyObject*)pyPlugCollection;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyNet_getSegmentsLocator ()"
|
||||
// Attribute Method : "PyNet_getSegments()"
|
||||
|
||||
static PyObject* PyNet_getSegmentsLocator ( PyNet *self )
|
||||
{
|
||||
trace << "PyNet_getSegmentsLocator ()" << endl;
|
||||
static PyObject* PyNet_getSegments(PyNet *self) {
|
||||
trace << "PyNet_getSegments()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Net.getSegmentsLocator()" )
|
||||
METHOD_HEAD ("Net.getSegments()")
|
||||
|
||||
Segments segments = net->getSegments ();
|
||||
|
||||
PySegmentLocator* pySegmentLocator = PyObject_NEW ( PySegmentLocator, &PyTypeSegmentLocator );
|
||||
if (pySegmentLocator == NULL) { return NULL; }
|
||||
|
||||
trace_in ();
|
||||
trace << "new PySegmentLocator [" << hex << pySegmentLocator << "]" << endl;
|
||||
trace_out ();
|
||||
PySegmentCollection* pySegmentCollection = NULL;
|
||||
|
||||
HTRY
|
||||
Segments* nets = new Segments(net->getSegments());
|
||||
|
||||
pySegmentLocator->_object = segments.getLocator ();
|
||||
pySegmentCollection = PyObject_NEW(PySegmentCollection, &PyTypeSegmentCollection);
|
||||
if (pySegmentCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pySegmentCollection->_object = nets;
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pySegmentLocator );
|
||||
|
||||
return (PyObject*)pySegmentCollection;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyNet_getPinsLocator ()"
|
||||
// Attribute Method : "PyNet_getPins()"
|
||||
|
||||
static PyObject* PyNet_getPinsLocator ( PyNet *self )
|
||||
{
|
||||
trace << "PyNet_getPinsLocator ()" << endl;
|
||||
static PyObject* PyNet_getPins(PyNet *self) {
|
||||
trace << "PyNet_getPins()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Net.getPinsLocator()" )
|
||||
METHOD_HEAD ("Net.getPins()")
|
||||
|
||||
Pins pins = net->getPins ();
|
||||
|
||||
PyPinLocator* pyPinLocator = PyObject_NEW ( PyPinLocator, &PyTypePinLocator );
|
||||
if (pyPinLocator == NULL) { return NULL; }
|
||||
|
||||
trace_in ();
|
||||
trace << "new PyPinLocator [" << hex << pyPinLocator << "]" << endl;
|
||||
trace_out ();
|
||||
PyPinCollection* pyPinCollection = NULL;
|
||||
|
||||
HTRY
|
||||
Pins* pins = new Pins(net->getPins());
|
||||
|
||||
pyPinLocator->_object = pins.getLocator ();
|
||||
pyPinCollection = PyObject_NEW(PyPinCollection, &PyTypePinCollection);
|
||||
if (pyPinCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyPinCollection->_object = pins;
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyPinLocator );
|
||||
|
||||
return (PyObject*)pyPinCollection;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyNet_getExternalComponentsLocator ()"
|
||||
// Attribute Method : "PyNet_getExternalComponents()"
|
||||
|
||||
static PyObject* PyNet_getExternalComponentsLocator ( PyNet *self )
|
||||
{
|
||||
trace << "PyNet_getExternalComponentsLocator ()" << endl;
|
||||
static PyObject* PyNet_getExternalComponents(PyNet *self) {
|
||||
trace << "PyNet_getExternalComponents()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Net.getExternalcomponentsLocator()" )
|
||||
METHOD_HEAD ( "Net.getExternalcomponents()" )
|
||||
|
||||
Components externalComponents = NetExternalComponents::get(net);
|
||||
|
||||
PyComponentLocator* pyExternalComponentsLocator = PyObject_NEW ( PyComponentLocator, &PyTypeComponentLocator );
|
||||
if (pyExternalComponentsLocator == NULL) { return NULL; }
|
||||
|
||||
trace_in ();
|
||||
trace << "new PyExternalComponentsLocator [" << hex << pyExternalComponentsLocator << "]" << endl;
|
||||
trace_out ();
|
||||
PyComponentCollection* pyComponentCollection = NULL;
|
||||
|
||||
HTRY
|
||||
Components* components = new Components(NetExternalComponents::get(net));
|
||||
|
||||
pyExternalComponentsLocator->_object = externalComponents.getLocator ();
|
||||
pyComponentCollection = PyObject_NEW(PyComponentCollection, &PyTypeComponentCollection);
|
||||
if (pyComponentCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyComponentCollection->_object = components;
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyExternalComponentsLocator );
|
||||
|
||||
return (PyObject*)pyComponentCollection;
|
||||
}
|
||||
|
||||
|
||||
|
@ -522,10 +509,10 @@ extern "C" {
|
|||
, "Returns the signal direction (by default set to UNDEFINED)." }
|
||||
, { "getX" , (PyCFunction)PyNet_getX , METH_NOARGS , "Returns net abscissa." }
|
||||
, { "getY" , (PyCFunction)PyNet_getY , METH_NOARGS , "Returns net ordinate." }
|
||||
, { "getExternalComponents", (PyCFunction)PyNet_getExternalComponentsLocator , METH_NOARGS , "Returns the collection of net's external components. (only for an external net)" }
|
||||
, { "getPlugsLocator" , (PyCFunction)PyNet_getPlugsLocator , METH_NOARGS , "Returns the collection of net's plugs." }
|
||||
, { "getPinsLocator" , (PyCFunction)PyNet_getPinsLocator , METH_NOARGS , "Returns the collection of net's pins." }
|
||||
, { "getSegmentsLocator" , (PyCFunction)PyNet_getSegmentsLocator , METH_NOARGS , "Returns the collection of net's segments." }
|
||||
, { "getExternalComponents", (PyCFunction)PyNet_getExternalComponents , METH_NOARGS , "Returns the collection of net's external components. (only for an external net)" }
|
||||
, { "getPlugs" , (PyCFunction)PyNet_getPlugs , METH_NOARGS , "Returns the collection of net's plugs." }
|
||||
, { "getPins" , (PyCFunction)PyNet_getPins , METH_NOARGS , "Returns the collection of net's pins." }
|
||||
, { "getSegments" , (PyCFunction)PyNet_getSegments , METH_NOARGS , "Returns the collection of net's segments." }
|
||||
, { "isGlobal" , (PyCFunction)PyNet_isGlobal , METH_NOARGS, "return true if the net is global" }
|
||||
, { "isExternal" , (PyCFunction)PyNet_isExternal , METH_NOARGS, "return true if the the net is external." }
|
||||
, { "isLogical" , (PyCFunction)PyNet_isLogical , METH_NOARGS, "return true if the net is logical ." }
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include "hurricane/isobar/PyNetCollection.h"
|
||||
#include "hurricane/isobar/PyNet.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
using namespace Hurricane;
|
||||
|
@ -10,9 +9,6 @@ using namespace Hurricane;
|
|||
extern "C" {
|
||||
|
||||
|
||||
#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Collection<Net*>,collection,function)
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyNetCollection" Python Module Code Part |
|
||||
// x=================================================================x
|
||||
|
@ -25,77 +21,32 @@ extern "C" {
|
|||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
#if 0
|
||||
// Standart Predicates (Attributes).
|
||||
DirectGetBoolAttribute(PyNetLocator_isValid,isValid,PyNetLocator,Locator<Net*>)
|
||||
|
||||
|
||||
// Standart Locator Accessors (Attributes).
|
||||
LocatorProgressAttribute(Net)
|
||||
LocatorGetElementAttribute(Net)
|
||||
LocatorGetCloneAttribute(Net)
|
||||
|
||||
|
||||
// Standart destroy (Attribute).
|
||||
DirectDestroyAttribute(PyNetLocator_destroy, PyNetLocator)
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyNetLocator Attribute Method table.
|
||||
|
||||
PyMethodDef PyNetLocator_Methods[] =
|
||||
{ { "isValid" , (PyCFunction)PyNetLocator_isValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." }
|
||||
, { "progress" , (PyCFunction)PyNetLocator_progress , METH_NOARGS , "Moves forward the locator to the following element." }
|
||||
, { "getElement" , (PyCFunction)PyNetLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." }
|
||||
, { "getClone" , (PyCFunction)PyNetLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." }
|
||||
, { "destroy" , (PyCFunction)PyNetLocator_destroy , METH_NOARGS
|
||||
, "Destroy associated hurricane object, the python object remains." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyNetLocator" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
DirectDeleteMethod(PyNetLocator_DeAlloc,PyNetLocator)
|
||||
LocatorPyTypeObjectLinkPyType(Net, Net*)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
DirectDeleteMethod(PyNetCollection_DeAlloc, PyNetCollection)
|
||||
DirectDeleteMethod(PyNetCollectionLocator_DeAlloc, PyNetCollectionLocator)
|
||||
|
||||
static PyObject* GetNetLocator(PyNetCollection *collection) {
|
||||
PyNetCollectionLocator* nl = PyObject_New(PyNetCollectionLocator, &PyTypeNetCollectionLocator);
|
||||
if (nl == NULL) {
|
||||
return NULL;
|
||||
static void PyNetCollectionLocator_DeAlloc(PyNetCollectionLocator* pyLocator) {
|
||||
Py_XDECREF(pyLocator->_collection);
|
||||
if (pyLocator->_object) {
|
||||
delete pyLocator->_object;
|
||||
}
|
||||
|
||||
nl->_object = collection->_object->getLocator();
|
||||
return (PyObject *)nl;
|
||||
PyObject_Del(pyLocator);
|
||||
}
|
||||
|
||||
GetLocatorMethod(Net)
|
||||
|
||||
static PyObject* NetLocatorNext(PyNetCollectionLocator* pyLocator) {
|
||||
Locator<Net*>* locator = pyLocator->_object;
|
||||
|
||||
if (locator->isValid()) {
|
||||
cerr << "akecoucou" << endl;
|
||||
Net* net = locator->getElement();
|
||||
locator->progress();
|
||||
return PyNet_Link(net);
|
||||
}
|
||||
cerr << "end" << endl;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
extern void PyNetCollection_LinkPyType () {
|
||||
trace << "PyNetCollection_LinkType()" << endl;
|
||||
PyTypeNetCollection.tp_iter = (getiterfunc)GetNetLocator; /* tp_iter */
|
||||
PyTypeNetCollection.tp_iter = (getiterfunc)GetLocator; /* tp_iter */
|
||||
PyTypeNetCollection.tp_dealloc = (destructor)PyNetCollection_DeAlloc;
|
||||
PyTypeNetCollectionLocator.tp_dealloc = (destructor)PyNetCollectionLocator_DeAlloc;
|
||||
PyTypeNetCollectionLocator.tp_iter = PyObject_SelfIter;
|
||||
|
@ -115,82 +66,12 @@ extern "C" {
|
|||
// ---------------------------------------------------------------
|
||||
// PyNetCollection Object Definitions.
|
||||
|
||||
PyTypeObject PyTypeNetCollection =
|
||||
{ PyObject_HEAD_INIT(NULL)
|
||||
0 /* ob_size. */
|
||||
, "Hurricane.NetCollection" /* tp_name. */
|
||||
, sizeof(PyNetCollection) /* tp_basicsize. */
|
||||
, 0 /* tp_itemsize. */
|
||||
/* methods. */
|
||||
, 0 /* tp_dealloc. */
|
||||
, 0 /* tp_print. */
|
||||
, 0 /* tp_getattr. */
|
||||
, 0 /* tp_setattr. */
|
||||
, 0 /* tp_compare. */
|
||||
, 0 /* tp_repr. */
|
||||
, 0 /* tp_as_number. */
|
||||
, 0 /* tp_as_sequence. */
|
||||
, 0 /* tp_as_mapping. */
|
||||
, 0 /* tp_hash. */
|
||||
, 0 /* tp_call. */
|
||||
, 0 /* tp_str */
|
||||
, 0 /* tp_getattro. */
|
||||
, 0 /* tp_setattro. */
|
||||
, 0 /* tp_as_buffer. */
|
||||
, Py_TPFLAGS_DEFAULT /* tp_flags. */
|
||||
, "NetCollection objects" /* tp_doc. */
|
||||
, 0 /* tp_traverse */
|
||||
, 0 /* tp_clear */
|
||||
, 0 /* tp_richcompare */
|
||||
, 0 /* tp_weaklistoffset */
|
||||
, 0 /* tp_iter */
|
||||
, 0 /* tp_iternext */
|
||||
, 0 /* tp_methods */
|
||||
, 0
|
||||
};
|
||||
|
||||
PyTypeObject PyTypeNetCollectionLocator =
|
||||
{ PyObject_HEAD_INIT(NULL)
|
||||
0 /* ob_size. */
|
||||
, "Hurricane.NetLocator" /* tp_name. */
|
||||
, sizeof(PyNetCollectionLocator) /* tp_basicsize. */
|
||||
, 0 /* tp_itemsize. */
|
||||
/* methods. */
|
||||
, 0 /* tp_dealloc. */
|
||||
, 0 /* tp_print. */
|
||||
, 0 /* tp_getattr. */
|
||||
, 0 /* tp_setattr. */
|
||||
, 0 /* tp_compare. */
|
||||
, 0 /* tp_repr. */
|
||||
, 0 /* tp_as_number. */
|
||||
, 0 /* tp_as_sequence. */
|
||||
, 0 /* tp_as_mapping. */
|
||||
, 0 /* tp_hash. */
|
||||
, 0 /* tp_call. */
|
||||
, 0 /* tp_str */
|
||||
, 0 /* tp_getattro. */
|
||||
, 0 /* tp_setattro. */
|
||||
, 0 /* tp_as_buffer. */
|
||||
, Py_TPFLAGS_DEFAULT /* tp_flags. */
|
||||
, "NetLocator objects" /* tp_doc. */
|
||||
, 0 /* tp_traverse */
|
||||
, 0 /* tp_clear */
|
||||
, 0 /* tp_richcompare */
|
||||
, 0 /* tp_weaklistoffset */
|
||||
, 0 /* tp_iter */
|
||||
, 0 /* tp_iternext */
|
||||
, 0 /* tp_methods */
|
||||
, 0
|
||||
};
|
||||
|
||||
|
||||
PyTypeCollectionObjectDefinitions(NetCollection)
|
||||
PyTypeCollectionObjectDefinitions(NetCollectionLocator)
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
|
|
@ -1,143 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PyNetLocator.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyNetLocator.h"
|
||||
#include "hurricane/isobar/PyNet.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
using namespace Hurricane;
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
# define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Locator<Net*>,locator,function)
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyNetLocator" Python Module Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
# if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyNetLocator" Attribute Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
// Standart Predicates (Attributes).
|
||||
DirectGetBoolAttribute(PyNetLocator_isValid,isValid,PyNetLocator,Locator<Net*>)
|
||||
|
||||
|
||||
// Standart Locator Accessors (Attributes).
|
||||
LocatorProgressAttribute(Net)
|
||||
LocatorGetElementAttribute(Net)
|
||||
LocatorGetCloneAttribute(Net)
|
||||
|
||||
|
||||
// Standart destroy (Attribute).
|
||||
DirectDestroyAttribute(PyNetLocator_destroy, PyNetLocator)
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyNetLocator Attribute Method table.
|
||||
|
||||
PyMethodDef PyNetLocator_Methods[] =
|
||||
{ { "isValid" , (PyCFunction)PyNetLocator_isValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." }
|
||||
, { "progress" , (PyCFunction)PyNetLocator_progress , METH_NOARGS , "Moves forward the locator to the following element." }
|
||||
, { "getElement" , (PyCFunction)PyNetLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." }
|
||||
, { "getClone" , (PyCFunction)PyNetLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." }
|
||||
, { "destroy" , (PyCFunction)PyNetLocator_destroy , METH_NOARGS
|
||||
, "Destroy associated hurricane object, the python object remains." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyNetLocator" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
DirectDeleteMethod(PyNetLocator_DeAlloc,PyNetLocator)
|
||||
LocatorPyTypeObjectLinkPyType(Net, Net*)
|
||||
|
||||
|
||||
|
||||
|
||||
# else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyNetLocator" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyNetLocator Object Definitions.
|
||||
|
||||
PyTypeObjectDefinitions(NetLocator)
|
||||
|
||||
|
||||
# endif // End of Shared Library Code Part.
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
|
@ -1,188 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Damien.Dupuis@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PyNetLocator.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyOccurrence.h"
|
||||
#include "hurricane/isobar/PyOccurrenceLocator.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
using namespace Hurricane;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Locator<Occurrence>,locator,function)
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyOccurrenceLocator" Python Module Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
#if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyOccurrenceLocator" Attribute Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
// Standart Predicates (Attributes).
|
||||
DirectGetBoolAttribute(PyOccurrenceLocator_isValid,isValid,PyOccurrenceLocator,Locator<Occurrence>)
|
||||
|
||||
// Standart destroy (Attribute).
|
||||
DirectDestroyAttribute(PyOccurrenceLocator_destroy, PyOccurrenceLocator)
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyOccurrenceLocator_progress ()"
|
||||
|
||||
static PyObject* PyOccurrenceLocator_progress ( PyOccurrenceLocator *self ) {
|
||||
trace << "OccurrenceLocator.progress()" << endl;
|
||||
|
||||
HTRY
|
||||
METHOD_HEAD ( "OccurrenceLocator.progress()" )
|
||||
|
||||
locator->progress ();
|
||||
HCATCH
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyOccurrenceLocator_getElement ()"
|
||||
|
||||
static PyObject* PyOccurrenceLocator_getElement ( PyOccurrenceLocator *self ) {
|
||||
trace << "OccurrenceLocator.getElement()" << endl;
|
||||
|
||||
METHOD_HEAD ( "OccurrenceLocator.getElement()" )
|
||||
|
||||
PyOccurrence* pyOccurrence = PyObject_NEW ( PyOccurrence, &PyTypeOccurrence );
|
||||
if ( pyOccurrence == NULL ) return NULL;
|
||||
|
||||
HTRY
|
||||
Occurrence occurrence = locator->getElement ();
|
||||
if ( occurrence == NULL )
|
||||
Py_RETURN_NONE;
|
||||
|
||||
pyOccurrence->_object = new Occurrence ( occurrence );
|
||||
HCATCH
|
||||
|
||||
return (PyObject*)pyOccurrence;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyOccurrenceLocator_getClone ()"
|
||||
|
||||
static PyObject* PyOccurrenceLocator_getClone ( PyOccurrenceLocator *self )
|
||||
{
|
||||
trace << "OccurrenceLocator.getClone()" << endl;
|
||||
|
||||
METHOD_HEAD ( "OccurrenceLocator.getClone()" )
|
||||
|
||||
PyOccurrenceLocator* pyOccurrenceLocator = NULL;
|
||||
|
||||
HTRY
|
||||
pyOccurrenceLocator = PyObject_NEW ( PyOccurrenceLocator, &PyTypeOccurrenceLocator );
|
||||
if ( pyOccurrenceLocator == NULL ) { return NULL; }
|
||||
|
||||
pyOccurrenceLocator->_object = locator->getClone();
|
||||
HCATCH
|
||||
|
||||
return ( (PyObject*)pyOccurrenceLocator );
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyOccurrenceLocator Attribute Method table.
|
||||
|
||||
PyMethodDef PyOccurrenceLocator_Methods[] =
|
||||
{ { "isValid" , (PyCFunction)PyOccurrenceLocator_isValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." }
|
||||
, { "progress" , (PyCFunction)PyOccurrenceLocator_progress , METH_NOARGS , "Moves forward the locator to the following element." }
|
||||
, { "getElement" , (PyCFunction)PyOccurrenceLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." }
|
||||
, { "getClone" , (PyCFunction)PyOccurrenceLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." }
|
||||
, { "destroy" , (PyCFunction)PyOccurrenceLocator_destroy , METH_NOARGS
|
||||
, "Destroy associated hurricane object, the python object remains." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyOccurrenceLocator" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
DirectDeleteMethod(PyOccurrenceLocator_DeAlloc,PyOccurrenceLocator)
|
||||
LocatorPyTypeObjectLinkPyType(Occurrence, Occurrence)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyOccurrenceLocator" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyOccurrenceLocator Object Definitions.
|
||||
|
||||
PyTypeObjectDefinitions(OccurrenceLocator)
|
||||
|
||||
# endif // End of Shared Library Code Part.
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
#include "hurricane/isobar/PyPath.h"
|
||||
#include "hurricane/isobar/PyCell.h"
|
||||
#include "hurricane/isobar/PyInstance.h"
|
||||
#include "hurricane/isobar/PyInstanceLocator.h"
|
||||
#include "hurricane/isobar/PyInstanceCollection.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
@ -257,25 +257,28 @@ extern "C" {
|
|||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyPath_getInstancesLocator ()"
|
||||
// Attribute Method : "PyPath_getInstances()"
|
||||
|
||||
static PyObject* PyPath_getInstancesLocator ( PyPath *self )
|
||||
{
|
||||
static PyObject* PyPath_getInstances(PyPath *self) {
|
||||
|
||||
trace << "PyPath_getInstancesLocator ()" << endl;
|
||||
trace << "PyPath_getInstances()" << endl;
|
||||
|
||||
METHOD_HEAD ( "Path.getInstancesLocator()" )
|
||||
METHOD_HEAD ( "Path.getInstances()" )
|
||||
|
||||
Instances instances = path->getInstances ();
|
||||
|
||||
PyInstanceLocator* pyInstanceLocator = PyObject_NEW ( PyInstanceLocator, &PyTypeInstanceLocator );
|
||||
if (pyInstanceLocator == NULL) { return NULL; }
|
||||
PyInstanceCollection* pyInstanceCollection = NULL;
|
||||
|
||||
HTRY
|
||||
pyInstanceLocator->_object = instances.getLocator ();
|
||||
HCATCH
|
||||
Instances* instances = new Instances(path->getInstances());
|
||||
|
||||
return ( (PyObject*)pyInstanceLocator );
|
||||
pyInstanceCollection = PyObject_NEW(PyInstanceCollection, &PyTypeInstanceCollection);
|
||||
if (pyInstanceCollection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pyInstanceCollection->_object = instances;
|
||||
HCATCH
|
||||
|
||||
return (PyObject*)pyInstanceCollection;
|
||||
}
|
||||
|
||||
|
||||
|
@ -293,7 +296,7 @@ extern "C" {
|
|||
, { "getMasterCell" , (PyCFunction)PyPath_getMasterCell , METH_NOARGS , "Returns the master cell referenced by the last instance of the path." }
|
||||
, { "getName" , (PyCFunction)PyPath_getName , METH_NOARGS , "Returns the concatenation of instances names." }
|
||||
, { "getTransformation" , (PyCFunction)PyPath_getTransformation , METH_VARARGS, "Return the resulting transformation." }
|
||||
, { "getInstancesLocator", (PyCFunction)PyPath_getInstancesLocator, METH_NOARGS , "Returns the collection of instances defining the path." }
|
||||
, { "getInstances", (PyCFunction)PyPath_getInstances, METH_NOARGS , "Returns the collection of instances defining the path." }
|
||||
, { "isEmpty" , (PyCFunction)PyPath_isEmpty , METH_NOARGS , "Return true if the path is empty." }
|
||||
, { "destroy" , (PyCFunction)PyPath_destroy , METH_NOARGS
|
||||
, "Destroy associated hurricane object, the python object remains." }
|
||||
|
|
|
@ -1,149 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id: PyPinLocator.cpp,v 1.9 2006/09/22 11:27:32 tsunami Exp $
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PyPinLocator.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyPinLocator.h"
|
||||
#include "hurricane/isobar/PyPin.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
using namespace Hurricane;
|
||||
|
||||
extern "C" {
|
||||
|
||||
#undef ACCESS_OBJECT
|
||||
#define ACCESS_OBJECT _object
|
||||
#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Locator<Pin*>,locator,function)
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyPin" Python Module Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
#if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyPinLocator" Attribute Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
// Standart Accessors (Attributes).
|
||||
|
||||
|
||||
// Standart Predicates (Attributes).
|
||||
DirectGetBoolAttribute(PyPinLocator_isValid,isValid,PyPinLocator,Locator<Pin*>)
|
||||
|
||||
|
||||
// Standart Locator Accessors (Attributes).
|
||||
LocatorProgressAttribute(Pin)
|
||||
LocatorGetElementAttribute(Pin)
|
||||
LocatorGetCloneAttribute(Pin)
|
||||
|
||||
|
||||
// Standart destroy (Attribute).
|
||||
DirectDestroyAttribute(PyPinLocator_destroy, PyPinLocator)
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyPinLocator Attribute Method table.
|
||||
|
||||
PyMethodDef PyPinLocator_Methods[] =
|
||||
{ { "isValid" , (PyCFunction)PyPinLocator_isValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." }
|
||||
, { "progress" , (PyCFunction)PyPinLocator_progress , METH_NOARGS , "Moves forward the locator to the following element." }
|
||||
, { "getElement" , (PyCFunction)PyPinLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." }
|
||||
, { "getClone" , (PyCFunction)PyPinLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." }
|
||||
, { "destroy" , (PyCFunction)PyPinLocator_destroy , METH_NOARGS
|
||||
, "Destroy associated hurricane object, the python object remains." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyPinLocator" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
DirectDeleteMethod(PyPinLocator_DeAlloc,PyPinLocator)
|
||||
LocatorPyTypeObjectLinkPyType(Pin, Pin*)
|
||||
|
||||
|
||||
|
||||
|
||||
# else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyPin" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyPinLocator Object Definitions.
|
||||
|
||||
|
||||
PyTypeObjectDefinitions(PinLocator)
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
|
@ -1,144 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id: PyPlugLocator.cpp,v 1.12 2006/09/22 11:27:32 tsunami Exp $
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PyPlugLocator.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyPlugLocator.h"
|
||||
#include "hurricane/isobar/PyPlug.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
using namespace Hurricane;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
#undef ACCESS_OBJECT
|
||||
#define ACCESS_OBJECT _object
|
||||
#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Locator<Plug*>,locator,function)
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyPlugLocator" Python Module Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
#if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyPlugLocator" Attribute Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
// Standart Accessors (Attributes).
|
||||
|
||||
|
||||
// Standart Predicates (Attributes).
|
||||
DirectGetBoolAttribute(PyPlugLocator_isValid,isValid,PyPlugLocator,Locator<Plug*>)
|
||||
|
||||
|
||||
// Standart Locator Accessors (Attributes).
|
||||
LocatorProgressAttribute(Plug)
|
||||
LocatorGetElementAttribute(Plug)
|
||||
LocatorGetCloneAttribute(Plug)
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyPlugLocator Attribute Method table.
|
||||
|
||||
PyMethodDef PyPlugLocator_Methods[] =
|
||||
{ { "isValid" , (PyCFunction)PyPlugLocator_isValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." }
|
||||
, { "progress" , (PyCFunction)PyPlugLocator_progress , METH_NOARGS , "Moves forward the locator to the following element." }
|
||||
, { "getElement" , (PyCFunction)PyPlugLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." }
|
||||
, { "getClone" , (PyCFunction)PyPlugLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyPlugLocator" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
DirectDeleteMethod(PyPlugLocator_DeAlloc,PyPlugLocator)
|
||||
LocatorPyTypeObjectLinkPyType(Plug, Plug*)
|
||||
|
||||
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyCell" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyPlugLocator Object Definitions.
|
||||
PyTypeObjectDefinitions(PlugLocator)
|
||||
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PyReferenceLocator.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
#include "hurricane/isobar/PyReferenceLocator.h"
|
||||
#include "hurricane/isobar/PyReference.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
using namespace Hurricane;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Locator<Reference*>,locator,function)
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyReferenceLocator" Python Module Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
# if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyReferenceLocator" Attribute Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
// Standart Accessors (Attributes).
|
||||
|
||||
|
||||
// Standart Predicates (Attributes).
|
||||
DirectGetBoolAttribute(PyReferenceLocator_isValid,isValid,PyReferenceLocator,Locator<Reference*>)
|
||||
|
||||
|
||||
// Standart Locator Accessors (Attributes).
|
||||
LocatorProgressAttribute(Reference)
|
||||
LocatorGetElementAttribute(Reference)
|
||||
LocatorGetCloneAttribute(Reference)
|
||||
|
||||
|
||||
// Standart destroy (Attribute).
|
||||
DirectDestroyAttribute(PyReferenceLocator_destroy, PyReferenceLocator)
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyReferenceLocator Attribute Method table.
|
||||
|
||||
PyMethodDef PyReferenceLocator_Methods[] =
|
||||
{ { "isValid" , (PyCFunction)PyReferenceLocator_isValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." }
|
||||
, { "progress" , (PyCFunction)PyReferenceLocator_progress , METH_NOARGS , "Moves forward the locator to the following element." }
|
||||
, { "getElement" , (PyCFunction)PyReferenceLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." }
|
||||
, { "getClone" , (PyCFunction)PyReferenceLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." }
|
||||
, { "destroy" , (PyCFunction)PyReferenceLocator_destroy , METH_NOARGS
|
||||
, "destroy associated hurricane object, the python object remains." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyReferenceLocator" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
DirectDeleteMethod(PyReferenceLocator_DeAlloc,PyReferenceLocator)
|
||||
LocatorPyTypeObjectLinkPyType(Reference, Reference*)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyReferenceLocator" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyReferenceLocator Object Definitions.
|
||||
|
||||
PyTypeObjectDefinitions(ReferenceLocator)
|
||||
|
||||
# endif // End of Shared Library Code Part.
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
|
@ -1,150 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id: PySegmentLocator.cpp,v 1.10 2006/09/22 11:27:32 tsunami Exp $
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PySegmentLocator.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
#include "hurricane/isobar/PySegmentLocator.h"
|
||||
#include "hurricane/isobar/PySegment.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
using namespace Hurricane;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Locator<Segment*>,locator,function)
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PySegmentLocator" Python Module Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
#if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PySegmentLocator" Attribute Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
// Standart Accessors (Attributes).
|
||||
|
||||
|
||||
// Standart Predicates (Attributes).
|
||||
DirectGetBoolAttribute(PySegmentLocator_isValid,isValid,PySegmentLocator,Locator<Segment*>)
|
||||
|
||||
|
||||
// Standart Locator Accessors (Attributes).
|
||||
LocatorProgressAttribute(Segment)
|
||||
LocatorGetElementEntityAttribute(Segment)
|
||||
LocatorGetCloneAttribute(Segment)
|
||||
|
||||
|
||||
// Standard Destroy (Attribute).
|
||||
DirectDestroyAttribute(PySegmentLocator_destroy, PySegmentLocator)
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PySegmentLocator Attribute Method table.
|
||||
|
||||
PyMethodDef PySegmentLocator_Methods[] =
|
||||
{ { "isValid" , (PyCFunction)PySegmentLocator_isValid , METH_NOARGS , "Returns true while the walk has not exhausted the set of elements, else false." }
|
||||
, { "progress" , (PyCFunction)PySegmentLocator_progress , METH_NOARGS , "Moves forward the locator to the following element." }
|
||||
, { "getElement" , (PyCFunction)PySegmentLocator_getElement , METH_NOARGS , "Returns the current element (or the value Type() when the locator is not or no longer valid)." }
|
||||
, { "getClone" , (PyCFunction)PySegmentLocator_getClone , METH_NOARGS , "This function allocates and returns a new locator that will have the same visiting course than the remaining one of the locator being cloned." }
|
||||
, { "destroy" , (PyCFunction)PySegmentLocator_destroy , METH_NOARGS
|
||||
, "destroy associated hurricane object, the python object remains." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PySegmentLocator" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
DirectDeleteMethod(PySegmentLocator_DeAlloc,PySegmentLocator)
|
||||
LocatorPyTypeObjectLinkPyType(Segment, Segment*)
|
||||
|
||||
|
||||
# else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PySegmentLocator" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PySegmentLocator Object Definitions.
|
||||
|
||||
PyTypeObjectDefinitions(SegmentLocator)
|
||||
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef __PYCELLCOLLECTION__
|
||||
#define __PYCELLCOLLECTION__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Cell.h"
|
||||
#include "hurricane/Cells.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyCellCollection".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Cells* _object;
|
||||
} PyCellCollection;
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Cell*>* _object;
|
||||
PyCellCollection* _collection;
|
||||
} PyCellCollectionLocator;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeCellCollection;
|
||||
extern PyTypeObject PyTypeCellCollectionLocator;
|
||||
|
||||
extern void PyCellCollection_LinkPyType();
|
||||
extern void PyCellCollectionLocator_LinkPyType();
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
#endif
|
|
@ -1,106 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./PyCellLocator.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef __PYCELLLOCATOR__
|
||||
#define __PYCELLLOCATOR__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Locator.h"
|
||||
#include "hurricane/Cell.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyCellLocator".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Cell*>* _object;
|
||||
} PyCellLocator;
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeCellLocator;
|
||||
extern PyMethodDef PyCellLocator_Methods[];
|
||||
|
||||
extern void PyCellLocator_LinkPyType ();
|
||||
|
||||
|
||||
#define IsPyCellLocator(v) ( (v)->ob_type == &PyTypeCellLocator )
|
||||
#define PYCELLLOCATOR(v) ( (PyCellLocator*)(v) )
|
||||
#define PYCELLLOCATOR_O(v) ( PYCELLLOCATOR(v)->_object )
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef __PYCOMPONENTCOLLECTION__
|
||||
#define __PYCOMPONENTCOLLECTION__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Component.h"
|
||||
#include "hurricane/Components.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyComponentCollection".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Components* _object;
|
||||
} PyComponentCollection;
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Component*>* _object;
|
||||
PyComponentCollection* _collection;
|
||||
} PyComponentCollectionLocator;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeComponentCollection;
|
||||
extern PyTypeObject PyTypeComponentCollectionLocator;
|
||||
|
||||
extern void PyComponentCollection_LinkPyType();
|
||||
extern void PyComponentCollectionLocator_LinkPyType();
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
#endif
|
|
@ -1,98 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Damien DUPUIS |
|
||||
// | E-mail : Damien.Dupuis@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./PyComponentLocator.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef __PYCOMPONENTLOCATOR__
|
||||
#define __PYCOMPONENTLOCATOR__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Component.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyComponentLocator".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Component*>* _object;
|
||||
} PyComponentLocator;
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeComponentLocator;
|
||||
extern PyMethodDef PyComponentLocator_Methods[];
|
||||
|
||||
extern void PyComponentLocator_LinkPyType ();
|
||||
|
||||
|
||||
#define IsPyComponentLocator(v) ( (v)->ob_type == &PyTypeComponentLocator )
|
||||
#define PYCOMPONENTLOCATOR(v) ( (PyComponentLocator*)(v) )
|
||||
#define PYCOMPONENTLOCATOR_O(v) ( PYCOMPONENTLOCATOR(v)->_object )
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
# endif
|
|
@ -379,97 +379,28 @@ extern "C" {
|
|||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Locator Attribute Method For Progress.
|
||||
// Collection and Locator macros
|
||||
|
||||
#define LocatorProgressAttribute(SELF_TYPE) \
|
||||
static PyObject* Py##SELF_TYPE##Locator_progress ( Py##SELF_TYPE##Locator *self ) \
|
||||
{ \
|
||||
trace << #SELF_TYPE "Locator.progress()" << endl; \
|
||||
METHOD_HEAD ( #SELF_TYPE "Locator.progress()" ) \
|
||||
\
|
||||
HTRY \
|
||||
locator->progress (); \
|
||||
HCATCH \
|
||||
\
|
||||
Py_RETURN_NONE; \
|
||||
|
||||
#define GetLocatorMethod(TYPE) \
|
||||
static PyObject* GetLocator(Py##TYPE##Collection* collection) { \
|
||||
Py##TYPE##CollectionLocator* cl = \
|
||||
PyObject_New(Py##TYPE##CollectionLocator, &PyType##TYPE##CollectionLocator); \
|
||||
if (cl == NULL) { \
|
||||
return NULL; \
|
||||
} \
|
||||
cl->_collection = collection; \
|
||||
cl->_object = collection->_object->getLocator(); \
|
||||
Py_INCREF(collection); \
|
||||
return (PyObject *)cl; \
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Locator Attribute Method For getElement.
|
||||
|
||||
# define LocatorGetElementAttribute(SELF_TYPE) \
|
||||
static PyObject* Py##SELF_TYPE##Locator_getElement ( Py##SELF_TYPE##Locator *self ) \
|
||||
{ \
|
||||
trace << #SELF_TYPE "Locator.getElement()" << endl; \
|
||||
METHOD_HEAD ( #SELF_TYPE "Locator.getElement()" ) \
|
||||
\
|
||||
SELF_TYPE* element = NULL; \
|
||||
\
|
||||
HTRY \
|
||||
element = locator->getElement (); \
|
||||
HCATCH \
|
||||
\
|
||||
return Py##SELF_TYPE##_Link ( element ); \
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Locator Attribute Method For getElement (element is PyEntity).
|
||||
|
||||
# define LocatorGetElementEntityAttribute(SELF_TYPE) \
|
||||
static PyObject* Py##SELF_TYPE##Locator_getElement ( Py##SELF_TYPE##Locator *self ) \
|
||||
{ \
|
||||
trace << #SELF_TYPE "Locator.getElement()" << endl; \
|
||||
METHOD_HEAD ( #SELF_TYPE "Locator.getElement()" ) \
|
||||
\
|
||||
PyObject* pyElement = NULL; \
|
||||
\
|
||||
HTRY \
|
||||
SELF_TYPE* element = locator->getElement (); \
|
||||
if ( element == NULL ) \
|
||||
Py_RETURN_NONE; \
|
||||
pyElement = PyEntity_NEW ( element ); \
|
||||
HCATCH \
|
||||
\
|
||||
return pyElement; \
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Locator Attribute Method For getClone.
|
||||
|
||||
# define LocatorGetCloneAttribute(SELF_TYPE) \
|
||||
static PyObject* Py##SELF_TYPE##Locator_getClone ( Py##SELF_TYPE##Locator *self ) \
|
||||
{ \
|
||||
trace << #SELF_TYPE "Locator.getClone()" << endl; \
|
||||
METHOD_HEAD ( #SELF_TYPE "Locator.getClone()" ) \
|
||||
\
|
||||
Py##SELF_TYPE##Locator* cloneLocator = NULL; \
|
||||
\
|
||||
HTRY \
|
||||
cloneLocator = PyObject_NEW ( Py##SELF_TYPE##Locator, &PyType##SELF_TYPE##Locator ); \
|
||||
if (cloneLocator == NULL) { return NULL; } \
|
||||
\
|
||||
cloneLocator->_object = locator->getClone(); \
|
||||
HCATCH \
|
||||
\
|
||||
return ( (PyObject*)cloneLocator ); \
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Attribute Method For Repr.
|
||||
|
||||
# define DirectReprMethod(PY_FUNC_NAME,PY_SELF_TYPE,SELF_TYPE) \
|
||||
|
||||
#define DirectReprMethod(PY_FUNC_NAME,PY_SELF_TYPE,SELF_TYPE) \
|
||||
static PyObject* PY_FUNC_NAME ( PY_SELF_TYPE *self ) \
|
||||
{ \
|
||||
if ( self->ACCESS_OBJECT == NULL ) \
|
||||
|
@ -721,6 +652,33 @@ extern "C" {
|
|||
, "#SELF_TYPE objects" /* tp_doc. */ \
|
||||
};
|
||||
|
||||
#define PyTypeCollectionObjectDefinitions(SELF_TYPE) \
|
||||
PyTypeObject PyType##SELF_TYPE = \
|
||||
{ PyObject_HEAD_INIT(NULL) \
|
||||
0 /* ob_size. */ \
|
||||
, "Hurricane."#SELF_TYPE /* tp_name. */ \
|
||||
, sizeof(Py##SELF_TYPE) /* tp_basicsize. */ \
|
||||
, 0 /* tp_itemsize. */ \
|
||||
/* methods. */ \
|
||||
, 0 /* tp_dealloc. */ \
|
||||
, 0 /* tp_print. */ \
|
||||
, 0 /* tp_getattr. */ \
|
||||
, 0 /* tp_setattr. */ \
|
||||
, 0 /* tp_compare. */ \
|
||||
, 0 /* tp_repr. */ \
|
||||
, 0 /* tp_as_number. */ \
|
||||
, 0 /* tp_as_sequence. */ \
|
||||
, 0 /* tp_as_mapping. */ \
|
||||
, 0 /* tp_hash. */ \
|
||||
, 0 /* tp_call. */ \
|
||||
, 0 /* tp_str */ \
|
||||
, PyObject_GenericGetAttr /* tp_getattro. */ \
|
||||
, 0 /* tp_setattro. */ \
|
||||
, 0 /* tp_as_buffer. */ \
|
||||
, Py_TPFLAGS_DEFAULT /* tp_flags. */ \
|
||||
, "#SELF_TYPE objects" /* tp_doc. */ \
|
||||
};
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//PyType_Ready Methods
|
||||
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
#include "hurricane/isobar/PyPlugLocator.h"
|
||||
|
||||
#include "hurricane/HyperNet.h"
|
||||
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef __PYINSTANCECOLLECTION__
|
||||
#define __PYINSTANCECOLLECTION__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Instance.h"
|
||||
#include "hurricane/Instances.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyInstanceCollection".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Instances* _object;
|
||||
} PyInstanceCollection;
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Instance*>* _object;
|
||||
PyInstanceCollection* _collection;
|
||||
} PyInstanceCollectionLocator;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeInstanceCollection;
|
||||
extern PyTypeObject PyTypeInstanceCollectionLocator;
|
||||
|
||||
extern void PyInstanceCollection_LinkPyType();
|
||||
extern void PyInstanceCollectionLocator_LinkPyType();
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
#endif
|
|
@ -1,107 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id: PyInstanceLocator.h,v 1.4 2006/05/03 14:00:03 jpc Exp $
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./PyInstanceLocator.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef __PYINSTANCELOCATOR__
|
||||
#define __PYINSTANCELOCATOR__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Locator.h"
|
||||
#include "hurricane/Instance.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyInstanceLocator".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Instance*>* _object;
|
||||
} PyInstanceLocator;
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeInstanceLocator;
|
||||
extern PyMethodDef PyInstanceLocator_Methods[];
|
||||
|
||||
extern void PyInstanceLocator_LinkPyType ();
|
||||
|
||||
|
||||
#define IsPyInstanceLocator(v) ( (v)->ob_type == &PyTypeInstanceLocator )
|
||||
#define PYINSTANCELOCATOR(v) ( (PyInstanceLocator*)(v) )
|
||||
#define PYINSTANCELOCATOR_O(v) ( PYINSTANCELOCATOR(v)->_object )
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
|
@ -25,11 +25,9 @@ extern "C" {
|
|||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Net*>* _object;
|
||||
PyNetCollection* _collection;
|
||||
} PyNetCollectionLocator;
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./PyNetLocator.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# ifndef __PYNETLOCATOR__
|
||||
# define __PYNETLOCATOR__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Locator.h"
|
||||
#include "hurricane/Net.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyNetLocator".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Net*>* _object;
|
||||
} PyNetLocator;
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeNetLocator;
|
||||
extern PyMethodDef PyNetLocator_Methods[];
|
||||
|
||||
extern void PyNetLocator_LinkPyType ();
|
||||
|
||||
|
||||
# define IsPyNetLocator(v) ( (v)->ob_type == &PyTypeNetLocator )
|
||||
# define PYNETLOCATOR(v) ( (PyNetLocator*)(v) )
|
||||
# define PYNETLOCATOR_O(v) ( PYNETLOCATOR(v)->_object )
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
|
||||
|
||||
|
||||
# endif
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef __PYOCCURRENCECOLLECTION__
|
||||
#define __PYOCCURRENCECOLLECTION__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Occurrence.h"
|
||||
#include "hurricane/Occurrences.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyOccurrenceCollection".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Occurrences* _object;
|
||||
} PyOccurrenceCollection;
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Occurrence>* _object;
|
||||
PyOccurrenceCollection* _collection;
|
||||
} PyOccurrenceCollectionLocator;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeOccurrenceCollection;
|
||||
extern PyTypeObject PyTypeOccurrenceCollectionLocator;
|
||||
|
||||
extern void PyOccurrenceCollection_LinkPyType();
|
||||
extern void PyOccurrenceCollectionLocator_LinkPyType();
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
#endif
|
|
@ -1,98 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./PyOccurrenceLocator.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# ifndef __PYOCCURRENCELOCATOR__
|
||||
# define __PYOCCURRENCELOCATOR__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Occurrence.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyOccurrenceLocator".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Occurrence>* _object;
|
||||
} PyOccurrenceLocator;
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeOccurrenceLocator;
|
||||
extern PyMethodDef PyOccurrenceLocator_Methods[];
|
||||
|
||||
extern void PyOccurrenceLocator_LinkPyType ();
|
||||
|
||||
|
||||
# define IsPyOccurrenceLocator(v) ( (v)->ob_type == &PyTypeOccurrenceLocator )
|
||||
# define PYOCCURRENCELOCATOR(v) ( (PyOccurrenceLocator*)(v) )
|
||||
# define PYOCCURRENCELOCATOR_O(v) ( PYOCCURRENCELOCATOR(v)->_object )
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
# endif
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef __PYPINCOLLECTION__
|
||||
#define __PYPINCOLLECTION__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Pin.h"
|
||||
#include "hurricane/Pins.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyPinCollection".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Pins* _object;
|
||||
} PyPinCollection;
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Pin*>* _object;
|
||||
PyPinCollection* _collection;
|
||||
} PyPinCollectionLocator;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypePinCollection;
|
||||
extern PyTypeObject PyTypePinCollectionLocator;
|
||||
|
||||
extern void PyPinCollection_LinkPyType();
|
||||
extern void PyPinCollectionLocator_LinkPyType();
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
#endif
|
|
@ -1,107 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id: PyPinLocator.h,v 1.3 2006/05/03 14:00:04 jpc Exp $
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./PyPinLocator.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# ifndef __PYPINLOCATOR__
|
||||
# define __PYPINLOCATOR__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Locator.h"
|
||||
#include "hurricane/Pin.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyPinLocator".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Pin*>* _object;
|
||||
} PyPinLocator;
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypePinLocator;
|
||||
extern PyMethodDef PyPinLocator_Methods[];
|
||||
|
||||
extern void PyPinLocator_LinkPyType ();
|
||||
|
||||
|
||||
# define IsPyPinLocator(v) ( (v)->ob_type == &PyTypePinLocator )
|
||||
# define PYPINLOCATOR(v) ( (PyPinLocator*)(v) )
|
||||
# define PYPINLOCATOR_O(v) ( PYPINLOCATOR(v)->_object )
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
|
||||
|
||||
|
||||
# endif
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef __PYPLUGCOLLECTION__
|
||||
#define __PYPLUGCOLLECTION__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Plug.h"
|
||||
#include "hurricane/Plugs.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyPlugCollection".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Plugs* _object;
|
||||
} PyPlugCollection;
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Plug*>* _object;
|
||||
PyPlugCollection* _collection;
|
||||
} PyPlugCollectionLocator;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypePlugCollection;
|
||||
extern PyTypeObject PyTypePlugCollectionLocator;
|
||||
|
||||
extern void PyPlugCollection_LinkPyType();
|
||||
extern void PyPlugCollectionLocator_LinkPyType();
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
#endif
|
|
@ -1,107 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id: PyPlugLocator.h,v 1.5 2006/05/03 14:00:04 jpc Exp $
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./PyPlugLocator.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# ifndef __PYPLUGLOCATOR__
|
||||
# define __PYPLUGLOCATOR__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Locator.h"
|
||||
#include "hurricane/Plug.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyPlugLocator".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Plug*>* _object;
|
||||
} PyPlugLocator;
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypePlugLocator;
|
||||
extern PyMethodDef PyPlugLocator_Methods[];
|
||||
|
||||
extern void PyPlugLocator_LinkPyType ();
|
||||
|
||||
|
||||
# define IsPyPlugLocator(v) ( (v)->ob_type == &PyTypePlugLocator )
|
||||
# define PYPLUGLOCATOR(v) ( (PyPlugLocator*)(v) )
|
||||
# define PYPLUGLOCATOR_O(v) ( PYPLUGLOCATOR(v)->_object )
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
|
||||
|
||||
|
||||
# endif
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef __PYREFERENCECOLLECTION__
|
||||
#define __PYREFERENCECOLLECTION__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Reference.h"
|
||||
#include "hurricane/References.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyReferenceCollection".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::References* _object;
|
||||
} PyReferenceCollection;
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Reference*>* _object;
|
||||
PyReferenceCollection* _collection;
|
||||
} PyReferenceCollectionLocator;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeReferenceCollection;
|
||||
extern PyTypeObject PyTypeReferenceCollectionLocator;
|
||||
|
||||
extern void PyReferenceCollection_LinkPyType();
|
||||
extern void PyReferenceCollectionLocator_LinkPyType();
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
#endif
|
|
@ -1,100 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./PyReferenceLocator.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# ifndef __PYREFERENCELOCATOR__
|
||||
# define __PYREFERENCELOCATOR__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Locator.h"
|
||||
#include "hurricane/Reference.h"
|
||||
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyReferenceLocator".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Reference*>* _object;
|
||||
} PyReferenceLocator;
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeReferenceLocator;
|
||||
extern PyMethodDef PyReferenceLocator_Methods[];
|
||||
|
||||
extern void PyReferenceLocator_LinkPyType ();
|
||||
|
||||
|
||||
# define IsPyReferenceLocator(v) ( (v)->ob_type == &PyTypeReferenceLocator )
|
||||
# define PYREFERENCELOCATOR(v) ( (PyReferenceLocator*)(v) )
|
||||
# define PYREFERENCELOCATOR_O(v) ( PYREFERENCELOCATOR(v)->_object )
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
# endif
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef __PYSEGMENTCOLLECTION__
|
||||
#define __PYSEGMENTCOLLECTION__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Segment.h"
|
||||
#include "hurricane/Segments.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PySegmentCollection".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Segments* _object;
|
||||
} PySegmentCollection;
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Segment*>* _object;
|
||||
PySegmentCollection* _collection;
|
||||
} PySegmentCollectionLocator;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeSegmentCollection;
|
||||
extern PyTypeObject PyTypeSegmentCollectionLocator;
|
||||
|
||||
extern void PySegmentCollection_LinkPyType();
|
||||
extern void PySegmentCollectionLocator_LinkPyType();
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
#endif
|
|
@ -1,107 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project 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 the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id: PySegmentLocator.h,v 1.3 2006/05/03 14:00:05 jpc Exp $
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | I s o b a r - Hurricane / Python Interface |
|
||||
// | |
|
||||
// | Author : Sophie BELLOEIL |
|
||||
// | E-mail : Sophie.Belloeil@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./PySegmentLocator.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# ifndef __PYSEGMENTLOCATOR__
|
||||
# define __PYSEGMENTLOCATOR__
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
#include "hurricane/Locator.h"
|
||||
#include "hurricane/Segment.h"
|
||||
|
||||
|
||||
namespace Isobar {
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PySegmentLocator".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Hurricane::Locator<Hurricane::Segment*>* _object;
|
||||
} PySegmentLocator;
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyHurricane.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeSegmentLocator;
|
||||
extern PyMethodDef PySegmentLocator_Methods[];
|
||||
|
||||
extern void PySegmentLocator_LinkPyType ();
|
||||
|
||||
|
||||
# define IsPySegmentLocator(v) ( (v)->ob_type == &PyTypeSegmentLocator )
|
||||
# define PYSEGMENTLOCATOR(v) ( (PySegmentLocator*)(v) )
|
||||
# define PYSEGMENTLOCATOR_O(v) ( PYSEGMENTLOCATOR(v)->_object )
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of Isobar namespace.
|
||||
|
||||
|
||||
|
||||
|
||||
# endif
|
Loading…
Reference in New Issue