I did suppress the constructor (new) system christophe build since it seemed bugged.
I rewrited everything like it was in Coriolis-1 (PyType_create) and reuse the precedent hierarchical system (PyTypeInheritedObjectDefinition) With all these changes Pharos is able to run the same script several times without any error (and not only 7 times before crash) Maybe there are still some bugs but it seems ok for the moment :D.
This commit is contained in:
parent
689b8cd722
commit
3b9f8cbd7b
|
@ -379,10 +379,27 @@ extern "C" {
|
|||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyBox" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
DirectDeleteMethod(PyBox_DeAlloc,PyBox)
|
||||
PyTypeObjectLinkPyType(Box)
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyBox" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyBox_new ()"
|
||||
PyObject* PyBox_new (PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyBox_new()" << endl;
|
||||
// Attribute Method : "PyBox_create ()"
|
||||
|
||||
PyObject* PyBox_create (PyObject *module, PyObject *args) {
|
||||
trace << "PyBox_create()" << endl;
|
||||
|
||||
Box* box = NULL;
|
||||
PyBox* pyBox = NULL;
|
||||
|
@ -392,9 +409,9 @@ extern "C" {
|
|||
PyObject* arg1;
|
||||
PyObject* arg2;
|
||||
PyObject* arg3;
|
||||
__cs.init ("Box.new");
|
||||
__cs.init ("Box.create");
|
||||
|
||||
if (! PyArg_ParseTuple(args,"|O&O&O&O&:Box.new",
|
||||
if (! PyArg_ParseTuple(args,"|O&O&O&O&:Box.create",
|
||||
Converter, &arg0,
|
||||
Converter, &arg1,
|
||||
Converter, &arg2,
|
||||
|
@ -423,23 +440,6 @@ extern "C" {
|
|||
return ( (PyObject*)pyBox );
|
||||
}
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyBox" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
DirectDeleteMethod(PyBox_DeAlloc,PyBox)
|
||||
PyTypeObjectLinkPyType(Box)
|
||||
PyTypeObjectConstructor(Box)
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyBox" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -621,15 +621,28 @@ extern "C" {
|
|||
// | "PyCell" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
static PyObject* PyCell_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyCell_new()" << endl;
|
||||
DBoDeleteMethod(Cell)
|
||||
PyTypeObjectLinkPyType(Cell)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyCell" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyCell_create ()"
|
||||
PyObject* PyCell_create ( PyObject *module, PyObject *args ) {
|
||||
trace << "PyCell_create()" << endl;
|
||||
|
||||
char* name = NULL;
|
||||
PyLibrary* pyLibrary = NULL;
|
||||
Cell* cell = NULL;
|
||||
|
||||
HTRY
|
||||
if (PyArg_ParseTuple(args,"O!s:Cell.new", &PyTypeLibrary, &pyLibrary, &name)) {
|
||||
if (PyArg_ParseTuple(args,"O!s:Cell.create", &PyTypeLibrary, &pyLibrary, &name)) {
|
||||
cell = Cell::create(PYLIBRARY_O(pyLibrary), Name(name));
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "invalid number of parameters for Cell constructor.");
|
||||
|
@ -640,25 +653,13 @@ extern "C" {
|
|||
return PyCell_Link(cell);
|
||||
}
|
||||
|
||||
DBoDeleteMethod(Cell)
|
||||
PyTypeObjectLinkPyType(Cell)
|
||||
PyTypeObjectConstructor(Cell)
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyCell" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// Link/Creation Method.
|
||||
DBoLinkCreateMethod(Cell)
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyCell Object Definitions.
|
||||
PyTypeObjectDefinitions(Cell)
|
||||
PyTypeInheritedObjectDefinitions(Cell, Entity)
|
||||
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
|
|
@ -169,7 +169,7 @@ extern "C" {
|
|||
// ---------------------------------------------------------------
|
||||
// PyComponent Object Definitions.
|
||||
|
||||
PyTypeObjectDefinitions(Component)
|
||||
PyTypeInheritedObjectDefinitions(Component, Entity)
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
||||
|
|
|
@ -86,11 +86,24 @@ extern "C" {
|
|||
// | "PyContact" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyContact_new ()"
|
||||
|
||||
static PyObject* PyContact_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyContact_new()" << endl;
|
||||
|
||||
DBoDeleteMethod(Contact)
|
||||
PyTypeObjectLinkPyType(Contact)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyContact" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyContact_create ()"
|
||||
|
||||
PyObject* PyContact_create ( PyObject *module, PyObject *args ) {
|
||||
trace << "PyContact_create()" << endl;
|
||||
|
||||
Contact* contact = NULL;
|
||||
|
||||
|
@ -99,11 +112,11 @@ extern "C" {
|
|||
PyLayer* pyLayer = NULL;
|
||||
PyComponent* pyComponent = NULL;
|
||||
DbU::Unit x=0, y=0, width=0, height=0;
|
||||
if (PyArg_ParseTuple(args, "O!O!ll|ll:Contact.new",
|
||||
if (PyArg_ParseTuple(args, "O!O!ll|ll:Contact.create",
|
||||
&PyTypeNet, &pyNet, &PyTypeLayer, &pyLayer,
|
||||
&x, &y, &width, &height)) {
|
||||
contact = Contact::create(PYNET_O(pyNet), PYLAYER_O(pyLayer), x, y, width, height);
|
||||
} else if (PyArg_ParseTuple(args, "O!O!ll|ll:Contact.new",
|
||||
} else if (PyArg_ParseTuple(args, "O!O!ll|ll:Contact.create",
|
||||
&PyTypeComponent, &pyComponent, &PyTypeLayer, &pyLayer,
|
||||
&x, &y, &width, &height)) {
|
||||
contact = Contact::create(PYCOMPONENT_O(pyComponent), PYLAYER_O(pyLayer), x, y, width, height);
|
||||
|
@ -120,20 +133,6 @@ extern "C" {
|
|||
|
||||
|
||||
|
||||
DBoDeleteMethod(Contact)
|
||||
PyTypeObjectLinkPyType(Contact)
|
||||
PyTypeObjectConstructor(Contact)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyContact" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
|
||||
|
||||
// Link/Creation Method.
|
||||
DBoLinkCreateMethod(Contact)
|
||||
|
@ -143,7 +142,7 @@ extern "C" {
|
|||
// ---------------------------------------------------------------
|
||||
// PyContact Object Definitions.
|
||||
|
||||
PyTypeObjectDefinitions(Contact)
|
||||
PyTypeInheritedObjectDefinitions(Contact, Component)
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
||||
|
|
|
@ -143,11 +143,22 @@ extern "C" {
|
|||
// x-------------------------------------------------------------x
|
||||
// | "PyDataBase" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyDataBase_new ()"
|
||||
|
||||
static PyObject* PyDataBase_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyDataBase_new()" << endl;
|
||||
DBoDeleteMethod(DataBase)
|
||||
PyTypeObjectLinkPyType(DataBase)
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyDataBase" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyDataBase_create ()"
|
||||
|
||||
PyObject* PyDataBase_create ( PyObject *module ) {
|
||||
trace << "PyDataBase_create()" << endl;
|
||||
|
||||
DataBase* db = NULL;
|
||||
|
||||
|
@ -158,17 +169,6 @@ extern "C" {
|
|||
return PyDataBase_Link(db);
|
||||
}
|
||||
|
||||
DBoDeleteMethod(DataBase)
|
||||
PyTypeObjectLinkPyType(DataBase)
|
||||
PyTypeObjectConstructor(DataBase)
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyDataBase" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
|
||||
// Link/Creation Method.
|
||||
|
|
|
@ -150,7 +150,7 @@ extern "C" {
|
|||
}
|
||||
|
||||
|
||||
PyTypeObjectDefinitions(Entity)
|
||||
PyTypeRootObjectDefinitions(Entity)
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyEntity Object Definitions.
|
||||
|
|
|
@ -68,11 +68,23 @@ extern "C" {
|
|||
// | "PyHorizontal" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyHorizontal_new ()"
|
||||
|
||||
static PyObject* PyHorizontal_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyHorizontal_new()" << endl;
|
||||
DBoDeleteMethod(Horizontal)
|
||||
PyTypeObjectLinkPyType(Horizontal)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyHorizontal" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyHorizontal_create ()"
|
||||
|
||||
PyObject* PyHorizontal_create ( PyObject *module, PyObject *args ) {
|
||||
trace << "PyHorizontal_create()" << endl;
|
||||
|
||||
PyObject* arg0;
|
||||
PyObject* arg1;
|
||||
|
@ -159,21 +171,6 @@ extern "C" {
|
|||
}
|
||||
|
||||
|
||||
DBoDeleteMethod(Horizontal)
|
||||
PyTypeObjectLinkPyType(Horizontal)
|
||||
PyTypeObjectConstructor(Horizontal)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyHorizontal" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Link/Creation Method.
|
||||
DBoLinkCreateMethod(Horizontal)
|
||||
|
@ -182,7 +179,7 @@ extern "C" {
|
|||
// ---------------------------------------------------------------
|
||||
// PyHorizontal Object Definitions.
|
||||
|
||||
PyTypeObjectDefinitions(Horizontal)
|
||||
PyTypeInheritedObjectDefinitions(Horizontal, Segment)
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
||||
|
|
|
@ -207,8 +207,8 @@ using namespace Hurricane;
|
|||
, const char* idBase ) {
|
||||
for ( unsigned i=0 ; i < _types.size() ; i++ ) {
|
||||
if ( ! strcmp ( _types[i]->_id, id ) ) {
|
||||
//throw Error ( objectTypeRedefinition ); // 04.09.2009 d2 modification
|
||||
cerr << objectTypeRedefinition << endl;
|
||||
//throw Error ( objectTypeRedefinition ); // 04.09.2009 d2 modification so Pharos can run several scripts during one execution
|
||||
trace << objectTypeRedefinition << endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -500,15 +500,31 @@ extern "C" {
|
|||
// x-------------------------------------------------------------x
|
||||
|
||||
static PyMethodDef PyHurricane_Methods[] =
|
||||
{ { "DbU_db" , PyDbU_db , METH_VARARGS, "Convert an integer to DbU::Unit (no scale factor)." }
|
||||
, { "DbU_grid" , PyDbU_grid , METH_VARARGS, "Convert a founder grid to DbU::Unit." }
|
||||
, { "DbU_lambda" , PyDbU_lambda , METH_VARARGS, "Convert a symbolic (lambda) to DbU::Unit." }
|
||||
, { "DbU_getDb" , PyDbU_getDb , METH_VARARGS, "Convert a DbU::Unit to an integer value (no scale factor)." }
|
||||
, { "DbU_getGrid" , PyDbU_getGrid , METH_VARARGS, "Convert a DbU::Unit to a to grid founder." }
|
||||
, { "DbU_getLambda" , PyDbU_getLambda , METH_VARARGS, "Convert a DbU::Unit to a symbolic value (to lambda)." }
|
||||
, { "getDataBase" , (PyCFunction)PyDataBase_getDataBase , METH_NOARGS , "Get the current DataBase." }
|
||||
//, { "openUpdateSession" , (PyCFunction)PyUpdateSession_openUpdateSession , METH_NOARGS , "Open an UpdateSession." }
|
||||
//, { "closeUpdateSession" , (PyCFunction)PyUpdateSession_closeUpdateSession, METH_NOARGS , "Close an UpdateSession." }
|
||||
{ { "DbU_db" , PyDbU_db , METH_VARARGS, "Converts an integer to DbU::Unit (no scale factor)." }
|
||||
, { "DbU_grid" , PyDbU_grid , METH_VARARGS, "Converts a founder grid to DbU::Unit." }
|
||||
, { "DbU_lambda" , PyDbU_lambda , METH_VARARGS, "Converts a symbolic (lambda) to DbU::Unit." }
|
||||
, { "DbU_getDb" , PyDbU_getDb , METH_VARARGS, "Converts a DbU::Unit to an integer value (no scale factor)." }
|
||||
, { "DbU_getGrid" , PyDbU_getGrid , METH_VARARGS, "Converts a DbU::Unit to a to grid founder." }
|
||||
, { "DbU_getLambda" , PyDbU_getLambda , METH_VARARGS, "Converts a DbU::Unit to a symbolic value (to lambda)." }
|
||||
, { "Point" , PyPoint_create , METH_VARARGS, "Creates a new Point." }
|
||||
, { "Box" , PyBox_create , METH_VARARGS, "Creates a new Box." }
|
||||
, { "Transformation" , PyTransformation_create , METH_VARARGS, "Creates a new Transformation." }
|
||||
, { "DataBase" , (PyCFunction)PyDataBase_create , METH_NOARGS , "Creates the DataBase." }
|
||||
, { "getDataBase" , (PyCFunction)PyDataBase_getDataBase , METH_NOARGS , "Gets the current DataBase." }
|
||||
, { "Library" , (PyCFunction)PyLibrary_create , METH_VARARGS, "Creates a new Library." }
|
||||
// , { "getLibrary" , (PyCFunction)PyLibrary_getLibrary , METH_NOARGS , "Gets the current Library." }
|
||||
, { "Reference" , (PyCFunction)PyReference_create , METH_VARARGS, "Creates a new Reference." }
|
||||
, { "Cell" , (PyCFunction)PyCell_create , METH_VARARGS, "Creates a new Cell." }
|
||||
, { "Instance" , (PyCFunction)PyInstance_create , METH_VARARGS, "Creates a new Instance." }
|
||||
, { "Net" , (PyCFunction)PyNet_create , METH_VARARGS, "Creates a new Net." }
|
||||
, { "HyperNet" , (PyCFunction)PyHyperNet_create , METH_VARARGS, "Creates a new HyperNet." }
|
||||
, { "Horizontal" , (PyCFunction)PyHorizontal_create , METH_VARARGS, "Creates a new Horizontal." }
|
||||
, { "Vertical" , (PyCFunction)PyVertical_create , METH_VARARGS, "Creates a new Vertical." }
|
||||
, { "Contact" , (PyCFunction)PyContact_create , METH_VARARGS, "Creates a new Contact." }
|
||||
, { "Pin" , (PyCFunction)PyPin_create , METH_VARARGS, "Creates a new Pin." }
|
||||
, { "Pad" , (PyCFunction)PyPad_create , METH_VARARGS, "Creates a new Pad." }
|
||||
, { "Path" , (PyCFunction)PyPath_create , METH_VARARGS, "Creates a new Path." }
|
||||
, { "Occurrence" , (PyCFunction)PyOccurrence_create , METH_VARARGS, "Creates a new Occurrence." }
|
||||
, { "getExternalComponents" , (PyCFunction)PyNetExternalComponents_getExternalComponents, METH_VARARGS, "Returns the components collection of an external net" }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
@ -556,25 +572,6 @@ extern "C" {
|
|||
PyPin_LinkPyType ();
|
||||
PyPlug_LinkPyType ();
|
||||
|
||||
//constructors
|
||||
PyPoint_Constructor();
|
||||
PyDataBase_Constructor();
|
||||
PyLibrary_Constructor();
|
||||
PyBox_Constructor();
|
||||
PyTransformation_Constructor();
|
||||
PyReference_Constructor();
|
||||
PyCell_Constructor();
|
||||
PyInstance_Constructor();
|
||||
PyNet_Constructor();
|
||||
PyHyperNet_Constructor();
|
||||
PyHorizontal_Constructor();
|
||||
PyVertical_Constructor();
|
||||
PyContact_Constructor();
|
||||
PyPin_Constructor();
|
||||
PyPad_Constructor();
|
||||
PyPath_Constructor();
|
||||
PyOccurrence_Constructor();
|
||||
|
||||
PYTYPE_READY ( Point )
|
||||
PYTYPE_READY ( Box )
|
||||
PYTYPE_READY ( Transformation )
|
||||
|
@ -670,23 +667,6 @@ extern "C" {
|
|||
<< " Failed to initialize Hurricane module." << endl;
|
||||
return;
|
||||
}
|
||||
PyModule_AddObject(module, "Point" , (PyObject*)&PyTypePoint);
|
||||
PyModule_AddObject(module, "DataBase" , (PyObject*)&PyTypeDataBase);
|
||||
PyModule_AddObject(module, "Library" , (PyObject*)&PyTypeLibrary);
|
||||
PyModule_AddObject(module, "Box" , (PyObject*)&PyTypeBox);
|
||||
PyModule_AddObject(module, "Transformation" , (PyObject*)&PyTypeTransformation);
|
||||
PyModule_AddObject(module, "Reference" , (PyObject*)&PyTypeReference);
|
||||
PyModule_AddObject(module, "Cell" , (PyObject*)&PyTypeCell);
|
||||
PyModule_AddObject(module, "Instance" , (PyObject*)&PyTypeInstance);
|
||||
PyModule_AddObject(module, "Net" , (PyObject*)&PyTypeNet);
|
||||
PyModule_AddObject(module, "HyperNet" , (PyObject*)&PyTypeHyperNet);
|
||||
PyModule_AddObject(module, "Horizontal" , (PyObject*)&PyTypeHorizontal);
|
||||
PyModule_AddObject(module, "Vertical" , (PyObject*)&PyTypeVertical);
|
||||
PyModule_AddObject(module, "Pad" , (PyObject*)&PyTypePad);
|
||||
PyModule_AddObject(module, "Contact" , (PyObject*)&PyTypeContact);
|
||||
PyModule_AddObject(module, "Pin" , (PyObject*)&PyTypePin);
|
||||
PyModule_AddObject(module, "Path" , (PyObject*)&PyTypePath);
|
||||
PyModule_AddObject(module, "Occurrence" , (PyObject*)&PyTypeOccurrence);
|
||||
|
||||
PyObject* dictionnary = PyModule_GetDict ( module );
|
||||
|
||||
|
|
|
@ -161,16 +161,27 @@ extern "C" {
|
|||
// x-------------------------------------------------------------x
|
||||
// | "PyHyperNet" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
DirectDeleteMethod(PyHyperNet_DeAlloc,PyHyperNet)
|
||||
PyTypeObjectLinkPyType(HyperNet)
|
||||
|
||||
|
||||
# else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyHyperNet" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyHyperNet_new ()"
|
||||
// Attribute Method : "PyHyperNet_create ()"
|
||||
|
||||
static PyObject* PyHyperNet_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyHyperNet_new()" << endl;
|
||||
PyObject* PyHyperNet_create ( PyObject *module, PyObject *args ) {
|
||||
trace << "PyHyperNet_create()" << endl;
|
||||
|
||||
HyperNet* hyperNet = NULL;
|
||||
HyperNet* hyperNet = NULL;
|
||||
PyObject* arg0;
|
||||
|
||||
if (! ParseOneArg ( "HyperNet.new()", args, ":occur", &arg0 )) {
|
||||
if (! ParseOneArg ( "HyperNet.create()", args, ":occur", &arg0 )) {
|
||||
PyErr_SetString(ConstructorError, "invalid number of parameters for HyperNet constructor." );
|
||||
return ( NULL );
|
||||
}
|
||||
|
@ -188,20 +199,6 @@ extern "C" {
|
|||
return ( (PyObject*)pyHyperNet );
|
||||
}
|
||||
|
||||
DirectDeleteMethod(PyHyperNet_DeAlloc,PyHyperNet)
|
||||
PyTypeObjectLinkPyType(HyperNet)
|
||||
PyTypeObjectConstructor(HyperNet)
|
||||
|
||||
|
||||
# else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyHyperNet" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
|
|
@ -369,11 +369,22 @@ extern "C" {
|
|||
// | "PyInstance" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
DBoDeleteMethod(Instance)
|
||||
PyTypeObjectLinkPyType(Instance)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyInstance" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyInstance_new ()"
|
||||
|
||||
static PyObject* PyInstance_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyInstance_new ()" << endl;
|
||||
PyObject* PyInstance_create ( PyObject *module, PyObject *args ) {
|
||||
trace << "PyInstance_create ()" << endl;
|
||||
|
||||
Instance* instance = NULL;
|
||||
PyObject* arg0;
|
||||
|
@ -382,7 +393,7 @@ extern "C" {
|
|||
PyObject* arg3;
|
||||
|
||||
HTRY
|
||||
__cs.init ("Instance.new");
|
||||
__cs.init ("Instance.create");
|
||||
if ( ! PyArg_ParseTuple(args,"O&O&O&|O&:Instance.new"
|
||||
,Converter,&arg0
|
||||
,Converter,&arg1
|
||||
|
@ -414,18 +425,6 @@ extern "C" {
|
|||
return PyInstance_Link ( instance );
|
||||
}
|
||||
|
||||
DBoDeleteMethod(Instance)
|
||||
PyTypeObjectLinkPyType(Instance)
|
||||
PyTypeObjectConstructor(Instance)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyInstance" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// Link/Creation Method.
|
||||
DBoLinkCreateMethod(Instance)
|
||||
|
@ -434,7 +433,7 @@ extern "C" {
|
|||
// ---------------------------------------------------------------
|
||||
// PyInstance Object Definitions.
|
||||
|
||||
PyTypeObjectDefinitions(Instance)
|
||||
PyTypeInheritedObjectDefinitions(Instance, Entity)
|
||||
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
|
|
@ -123,16 +123,30 @@ extern "C" {
|
|||
// | "PyLibrary" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
static PyObject* PyLibrary_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyLibrary_new()" << endl;
|
||||
DBoDeleteMethod(Library)
|
||||
PyTypeObjectLinkPyType(Library)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyLibrary" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyLibrary_create()"
|
||||
|
||||
PyObject* PyLibrary_create ( PyObject *module, PyObject *args ) {
|
||||
trace << "PyLibrary_create()" << endl;
|
||||
|
||||
PyObject* arg0;
|
||||
PyObject* arg1;
|
||||
Library* library = NULL;
|
||||
|
||||
HTRY
|
||||
__cs.init ("Library.new");
|
||||
if (!PyArg_ParseTuple(args,"O&O&:Library.new", Converter, &arg0, Converter, &arg1)) {
|
||||
__cs.init ("Library.create");
|
||||
if (!PyArg_ParseTuple(args,"O&O&:Library.create", Converter, &arg0, Converter, &arg1)) {
|
||||
PyErr_SetString ( ConstructorError, "invalid number of parameters for Library constructor." );
|
||||
return NULL;
|
||||
}
|
||||
|
@ -151,17 +165,26 @@ extern "C" {
|
|||
return PyLibrary_Link ( library );
|
||||
}
|
||||
|
||||
DBoDeleteMethod(Library)
|
||||
PyTypeObjectLinkPyType(Library)
|
||||
PyTypeObjectConstructor(Library)
|
||||
#if 0
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyLibrary_getLibrary ()"
|
||||
|
||||
//needs args, have to check hurricane object code
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
PyObject* PyLibrary_getLibrary ( PyObject* module )
|
||||
{
|
||||
trace << "PyLibrary_getLibrary()" << endl;
|
||||
Library* lib = NULL;
|
||||
|
||||
HTRY
|
||||
lib = Library::getLibrary ();
|
||||
if ( lib == NULL )
|
||||
PyErr_SetString ( HurricaneError, "Library has not been created yet" );
|
||||
HCATCH
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyLibrary" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
return PyLibrary_Link ( lib );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Link/Creation Method.
|
||||
|
|
|
@ -466,31 +466,8 @@ extern "C" {
|
|||
// | "PyNet" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyNet_new ()"
|
||||
|
||||
static PyObject* PyNet_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyNet_new()" << endl;
|
||||
|
||||
char* name = NULL;
|
||||
PyCell* pyCell = NULL;
|
||||
Net* net = NULL;
|
||||
|
||||
HTRY
|
||||
if (PyArg_ParseTuple(args,"O!s:Net.new", &PyTypeCell, &pyCell, &name)) {
|
||||
net = Net::create(PYCELL_O(pyCell), Name(name));
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "invalid number of parameters for Net constructor." );
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
||||
return PyNet_Link(net);
|
||||
}
|
||||
|
||||
DBoDeleteMethod(Net)
|
||||
PyTypeObjectLinkPyType(Net)
|
||||
PyTypeObjectConstructor(Net)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
@ -501,6 +478,28 @@ extern "C" {
|
|||
// x=================================================================x
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyNet_create ()"
|
||||
|
||||
PyObject* PyNet_create ( PyObject *module, PyObject *args ) {
|
||||
trace << "PyNet_create()" << endl;
|
||||
|
||||
char* name = NULL;
|
||||
PyCell* pyCell = NULL;
|
||||
Net* net = NULL;
|
||||
|
||||
HTRY
|
||||
if (PyArg_ParseTuple(args,"O!s:Net.create", &PyTypeCell, &pyCell, &name)) {
|
||||
net = Net::create(PYCELL_O(pyCell), Name(name));
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "invalid number of parameters for Net constructor." );
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
||||
return PyNet_Link(net);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Link/Creation Method.
|
||||
|
@ -512,7 +511,7 @@ extern "C" {
|
|||
// ---------------------------------------------------------------
|
||||
// PyNet Object Definitions.
|
||||
|
||||
PyTypeObjectDefinitions(Net)
|
||||
PyTypeInheritedObjectDefinitions(Net, Entity)
|
||||
|
||||
|
||||
# endif // End of Shared Library Code Part.
|
||||
|
|
|
@ -188,18 +188,31 @@ extern "C" {
|
|||
// | "PyOccurrence" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyOccurrence_new ()"
|
||||
|
||||
static PyObject* PyOccurrence_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyOccurrence_new()" << endl;
|
||||
|
||||
DirectDeleteMethod(PyOccurrence_DeAlloc,PyOccurrence)
|
||||
PyTypeObjectLinkPyType(Occurrence)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyOccurrence" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyOccurrence_create ()"
|
||||
|
||||
PyObject* PyOccurrence_create ( PyObject *module, PyObject *args ) {
|
||||
trace << "PyOccurrence_create()" << endl;
|
||||
|
||||
Occurrence* occurrence;
|
||||
PyObject* arg0;
|
||||
PyObject* arg1;
|
||||
|
||||
__cs.init ("Occurrence.new");
|
||||
if ( ! PyArg_ParseTuple(args,"|O&O&:Occurrence.new"
|
||||
__cs.init ("Occurrence.create");
|
||||
if ( ! PyArg_ParseTuple(args,"|O&O&:Occurrence.create"
|
||||
,Converter,&arg0
|
||||
,Converter,&arg1
|
||||
)) {
|
||||
|
@ -230,22 +243,6 @@ extern "C" {
|
|||
|
||||
|
||||
|
||||
DirectDeleteMethod(PyOccurrence_DeAlloc,PyOccurrence)
|
||||
PyTypeObjectLinkPyType(Occurrence)
|
||||
PyTypeObjectConstructor(Occurrence)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyOccurrence" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyOccurrence Object Definitions.
|
||||
|
||||
|
|
|
@ -92,11 +92,23 @@ extern "C" {
|
|||
// | "PyPad" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
DBoDeleteMethod(Pad)
|
||||
PyTypeObjectLinkPyType(Pad)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyPad" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyPad_new ()"
|
||||
|
||||
static PyObject* PyPad_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyPad_new()" << endl;
|
||||
PyObject* PyPad_create ( PyObject *module, PyObject *args ) {
|
||||
trace << "PyPad_create()" << endl;
|
||||
|
||||
PyObject* arg0;
|
||||
PyObject* arg1;
|
||||
|
@ -104,8 +116,8 @@ extern "C" {
|
|||
Pad* pad = NULL;
|
||||
|
||||
HTRY
|
||||
__cs.init ("Pad.new");
|
||||
if (!PyArg_ParseTuple(args,"O&O&O&:Pad.new"
|
||||
__cs.init ("Pad.create");
|
||||
if (!PyArg_ParseTuple(args,"O&O&O&:Pad.create"
|
||||
,Converter,&arg0
|
||||
,Converter,&arg1
|
||||
,Converter,&arg2
|
||||
|
@ -127,19 +139,6 @@ extern "C" {
|
|||
}
|
||||
|
||||
|
||||
DBoDeleteMethod(Pad)
|
||||
PyTypeObjectLinkPyType(Pad)
|
||||
PyTypeObjectConstructor(Pad)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyPad" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// Link/Creation Method.
|
||||
DBoLinkCreateMethod(Pad)
|
||||
|
||||
|
@ -148,7 +147,7 @@ extern "C" {
|
|||
// PyPad Object Definitions.
|
||||
|
||||
|
||||
PyTypeObjectDefinitions(Pad)
|
||||
PyTypeInheritedObjectDefinitions(Pad, Component)
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
||||
|
|
|
@ -260,19 +260,30 @@ extern "C" {
|
|||
// | "PyPath" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyPath_new ()"
|
||||
DirectDeleteMethod(PyPath_DeAlloc,PyPath)
|
||||
PyTypeObjectLinkPyType(Path)
|
||||
|
||||
static PyObject* PyPath_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyPath_new()" << endl;
|
||||
|
||||
# else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyPath" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyPath_create ()"
|
||||
|
||||
PyObject* PyPath_create ( PyObject *module, PyObject *args ) {
|
||||
trace << "PyPath_create()" << endl;
|
||||
|
||||
Path* path = NULL;
|
||||
PyObject* arg0 = NULL;
|
||||
PyObject* arg1 = NULL;
|
||||
PyPath* pyPath = NULL;
|
||||
|
||||
__cs.init ("Path.new");
|
||||
if ( ! PyArg_ParseTuple(args,"|O&O&:Path.new"
|
||||
__cs.init ("Path.create");
|
||||
if ( ! PyArg_ParseTuple(args,"|O&O&:Path.create"
|
||||
,Converter,&arg0
|
||||
,Converter,&arg1
|
||||
)) {
|
||||
|
@ -305,20 +316,6 @@ extern "C" {
|
|||
return ( (PyObject*)pyPath );
|
||||
}
|
||||
|
||||
DirectDeleteMethod(PyPath_DeAlloc,PyPath)
|
||||
PyTypeObjectLinkPyType(Path)
|
||||
PyTypeObjectConstructor(Path)
|
||||
|
||||
|
||||
# else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyPath" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyPath Object Definitions.
|
||||
|
|
|
@ -91,6 +91,18 @@ extern "C" {
|
|||
// | "PyPin" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
|
||||
DBoDeleteMethod(Pin)
|
||||
PyTypeObjectLinkPyType(Pin)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyPin" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
static Pin::PlacementStatus PyInt_AsPlacementStatus ( PyObject* object ) {
|
||||
switch ( PyInt_AsLong(object) ) {
|
||||
case Pin::PlacementStatus::UNPLACED : return ( Pin::PlacementStatus(Pin::PlacementStatus::UNPLACED) );
|
||||
|
@ -114,14 +126,14 @@ extern "C" {
|
|||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyPin_new ()"
|
||||
// Attribute Method : "PyPin_create ()"
|
||||
|
||||
static PyObject* PyPin_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
PyObject* PyPin_create ( PyObject *module, PyObject *args ) {
|
||||
Pin* pin = NULL;
|
||||
|
||||
HTRY
|
||||
|
||||
trace << "PyPin_new()" << endl;
|
||||
trace << "PyPin_create()" << endl;
|
||||
PyObject* arg0;
|
||||
PyObject* arg1;
|
||||
PyObject* arg2;
|
||||
|
@ -132,8 +144,8 @@ extern "C" {
|
|||
PyObject* arg7;
|
||||
PyObject* arg8;
|
||||
|
||||
__cs.init ("Pin.new");
|
||||
if (!PyArg_ParseTuple(args,"O&O&O&O&O&O&O&|O&O&:Pin.new"
|
||||
__cs.init ("Pin.create");
|
||||
if (!PyArg_ParseTuple(args,"O&O&O&O&O&O&O&|O&O&:Pin.create"
|
||||
, Converter, &arg0
|
||||
, Converter, &arg1
|
||||
, Converter, &arg2
|
||||
|
@ -190,18 +202,6 @@ extern "C" {
|
|||
return PyPin_Link ( pin );
|
||||
}
|
||||
|
||||
DBoDeleteMethod(Pin)
|
||||
PyTypeObjectLinkPyType(Pin)
|
||||
PyTypeObjectConstructor(Pin)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyPin" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
|
||||
// Link/Creation Method.
|
||||
|
@ -213,7 +213,7 @@ extern "C" {
|
|||
// ---------------------------------------------------------------
|
||||
// PyPin Object Definitions.
|
||||
|
||||
PyTypeObjectDefinitions(Pin)
|
||||
PyTypeInheritedObjectDefinitions(Pin, Contact)
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
||||
|
|
|
@ -208,7 +208,7 @@ extern "C" {
|
|||
// ---------------------------------------------------------------
|
||||
// PyPlug Object Definitions.
|
||||
|
||||
PyTypeObjectDefinitions(Plug)
|
||||
PyTypeInheritedObjectDefinitions(Plug, Component)
|
||||
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
|
|
@ -136,8 +136,25 @@ extern "C" {
|
|||
// | "PyPoint" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
static PyObject* PyPoint_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyPoint_new()" << endl;
|
||||
|
||||
|
||||
DirectDeleteMethod(PyPoint_DeAlloc,PyPoint)
|
||||
PyTypeObjectLinkPyType(Point)
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyPoint" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyPoint_create ()"
|
||||
|
||||
PyObject* PyPoint_create ( PyObject* module, PyObject *args )
|
||||
{
|
||||
trace << "PyPoint_create()" << endl;
|
||||
|
||||
Point* point;
|
||||
PyObject* arg0;
|
||||
|
@ -170,20 +187,6 @@ extern "C" {
|
|||
|
||||
return ( (PyObject*)pyPoint );
|
||||
}
|
||||
|
||||
|
||||
DirectDeleteMethod(PyPoint_DeAlloc,PyPoint)
|
||||
PyTypeObjectLinkPyType(Point)
|
||||
PyTypeObjectConstructor(Point)
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyPoint" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyPoint Object Definitions.
|
||||
|
||||
|
|
|
@ -120,11 +120,23 @@ extern "C" {
|
|||
// | "PyReference" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyReference_new ()"
|
||||
DBoDeleteMethod(Reference)
|
||||
PyTypeObjectLinkPyType(Reference)
|
||||
|
||||
static PyObject* PyReference_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyReference_new()" << endl;
|
||||
|
||||
# else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyReference" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyReference_create ()"
|
||||
|
||||
PyObject* PyReference_create ( PyObject *module, PyObject *args ) {
|
||||
trace << "PyReference_create()" << endl;
|
||||
Reference* reference = NULL;
|
||||
|
||||
PyObject* arg0;
|
||||
|
@ -134,8 +146,8 @@ extern "C" {
|
|||
|
||||
HTRY
|
||||
|
||||
__cs.init ("Reference.new");
|
||||
if ( ! PyArg_ParseTuple(args,"O&O&O&|O&:Reference.new"
|
||||
__cs.init ("Reference.create");
|
||||
if ( ! PyArg_ParseTuple(args,"O&O&O&|O&:Reference.create"
|
||||
,Converter,&arg0
|
||||
,Converter,&arg1
|
||||
,Converter,&arg2
|
||||
|
@ -165,28 +177,13 @@ extern "C" {
|
|||
|
||||
|
||||
|
||||
DBoDeleteMethod(Reference)
|
||||
PyTypeObjectLinkPyType(Reference)
|
||||
PyTypeObjectConstructor(Reference)
|
||||
|
||||
|
||||
# else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyReference" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
|
||||
|
||||
// Link/Creation Method.
|
||||
DBoLinkCreateMethod(Reference)
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyReference Object Definitions.
|
||||
PyTypeObjectDefinitions(Reference)
|
||||
PyTypeInheritedObjectDefinitions(Reference, Entity)
|
||||
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
|
|
@ -141,7 +141,7 @@ extern "C" {
|
|||
// PySegment Object Definitions.
|
||||
|
||||
|
||||
PyTypeObjectDefinitions(Segment)
|
||||
PyTypeInheritedObjectDefinitions(Segment, Component)
|
||||
|
||||
# endif // End of Shared Library Code Part.
|
||||
|
||||
|
|
|
@ -491,6 +491,17 @@ extern "C" {
|
|||
// | "PyTransformation" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
DirectDeleteMethod(PyTransformation_DeAlloc,PyTransformation)
|
||||
PyTypeObjectLinkPyType(Transformation)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyTransformation" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
static Transformation::Orientation PyInt_AsOrientation ( PyObject* object ) {
|
||||
switch ( PyInt_AsLong(object) ) {
|
||||
case Transformation::Orientation::ID : return ( Transformation::Orientation(Transformation::Orientation::ID) );
|
||||
|
@ -507,18 +518,18 @@ extern "C" {
|
|||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyTransformation_new ()"
|
||||
// Attribute Method : "PyTransformation_create ()"
|
||||
|
||||
static PyObject* PyTransformation_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyTransformation_new()" << endl;
|
||||
PyObject* PyTransformation_create (PyObject *module, PyObject *args) {
|
||||
trace << "PyTransformation_create()" << endl;
|
||||
|
||||
Transformation* transf;
|
||||
PyObject* arg0;
|
||||
PyObject* arg1;
|
||||
PyObject* arg2;
|
||||
|
||||
__cs.init ("Transformation.new");
|
||||
if ( ! PyArg_ParseTuple(args,"|O&O&O&:Transformation.new"
|
||||
__cs.init ("Transformation.create");
|
||||
if ( ! PyArg_ParseTuple(args,"|O&O&O&:Transformation.create"
|
||||
,Converter,&arg0
|
||||
,Converter,&arg1
|
||||
,Converter,&arg2
|
||||
|
@ -558,18 +569,6 @@ extern "C" {
|
|||
return (PyObject*)pyTransformation;
|
||||
}
|
||||
|
||||
DirectDeleteMethod(PyTransformation_DeAlloc,PyTransformation)
|
||||
PyTypeObjectLinkPyType(Transformation)
|
||||
PyTypeObjectConstructor(Transformation)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyTransformation" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
// x-------------------------------------------------------------x
|
||||
// | "PyTransformation" Local Functions |
|
||||
|
|
|
@ -65,11 +65,22 @@ extern "C" {
|
|||
// | "PyVertical" Object Methods |
|
||||
// x-------------------------------------------------------------x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyVertical_new ()"
|
||||
DBoDeleteMethod(Vertical)
|
||||
PyTypeObjectLinkPyType(Vertical)
|
||||
|
||||
static PyObject* PyVertical_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
|
||||
trace << "PyVertical_new()" << endl;
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyVertical" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Attribute Method : "PyVertical_create ()"
|
||||
|
||||
PyObject* PyVertical_create ( PyObject *module, PyObject *args ) {
|
||||
trace << "PyVertical_create()" << endl;
|
||||
|
||||
PyObject* arg0;
|
||||
PyObject* arg1;
|
||||
|
@ -81,8 +92,8 @@ extern "C" {
|
|||
Vertical* vertical = NULL;
|
||||
|
||||
HTRY
|
||||
__cs.init ("Vertical.new");
|
||||
if (!PyArg_ParseTuple(args,"O&O&O&|O&O&O&O&:Vertical.new"
|
||||
__cs.init ("Vertical.create");
|
||||
if (!PyArg_ParseTuple(args,"O&O&O&|O&O&O&O&:Vertical.create"
|
||||
,Converter,&arg0
|
||||
,Converter,&arg1
|
||||
,Converter,&arg2
|
||||
|
@ -154,18 +165,6 @@ extern "C" {
|
|||
return PyVertical_Link(vertical);
|
||||
}
|
||||
|
||||
DBoDeleteMethod(Vertical)
|
||||
PyTypeObjectLinkPyType(Vertical)
|
||||
PyTypeObjectConstructor(Vertical)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// x=================================================================x
|
||||
// | "PyVertical" Shared Library Code Part |
|
||||
// x=================================================================x
|
||||
|
||||
|
||||
|
||||
// Link/Creation Method.
|
||||
|
@ -174,7 +173,7 @@ extern "C" {
|
|||
// ---------------------------------------------------------------
|
||||
// PyVertical Object Definitions.
|
||||
|
||||
PyTypeObjectDefinitions(Vertical)
|
||||
PyTypeInheritedObjectDefinitions(Vertical, Segment)
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
||||
|
|
|
@ -84,8 +84,8 @@ extern "C" {
|
|||
extern PyTypeObject PyTypeBox;
|
||||
extern PyMethodDef PyBox_Methods[];
|
||||
|
||||
extern void PyBox_LinkPyType();
|
||||
extern void PyBox_Constructor();
|
||||
extern PyObject* PyBox_create ( PyObject* self, PyObject* args );
|
||||
extern void PyBox_LinkPyType ();
|
||||
|
||||
|
||||
#define IsPyBox(v) ( (v)->ob_type == &PyTypeBox )
|
||||
|
|
|
@ -83,9 +83,9 @@ extern "C" {
|
|||
extern PyTypeObject PyTypeCell;
|
||||
extern PyMethodDef PyCell_Methods[];
|
||||
|
||||
extern PyObject* PyCell_create ( PyObject* module, PyObject* args );
|
||||
extern PyObject* PyCell_Link ( Hurricane::Cell* object );
|
||||
extern void PyCell_LinkPyType ();
|
||||
extern void PyCell_Constructor ();
|
||||
|
||||
|
||||
#define IsPyCell(v) ((v)->ob_type == &PyTypeCell)
|
||||
|
|
|
@ -83,9 +83,9 @@ extern "C" {
|
|||
extern PyTypeObject PyTypeContact;
|
||||
extern PyMethodDef PyContact_Methods[];
|
||||
|
||||
extern PyObject* PyContact_Link(Hurricane::Contact* object);
|
||||
extern void PyContact_LinkPyType();
|
||||
extern void PyContact_Constructor();
|
||||
extern PyObject* PyContact_create ( PyObject* module, PyObject* args );
|
||||
extern PyObject* PyContact_Link ( Hurricane::Contact* object );
|
||||
extern void PyContact_LinkPyType ();
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -85,10 +85,10 @@ extern "C" {
|
|||
extern PyTypeObject PyTypeDataBase;
|
||||
extern PyMethodDef PyDataBase_Methods[];
|
||||
|
||||
extern PyObject* PyDataBase_create ( PyObject* module );
|
||||
extern PyObject* PyDataBase_getDataBase ( PyObject* module );
|
||||
extern PyObject* PyDataBase_Link ( Hurricane::DataBase* db );
|
||||
extern void PyDataBase_LinkPyType ();
|
||||
extern void PyDataBase_Constructor ();
|
||||
|
||||
|
||||
#define IsPyDataBase(v) ( (v)->ob_type == &PyTypeDataBase )
|
||||
|
|
|
@ -84,9 +84,9 @@ extern "C" {
|
|||
extern PyTypeObject PyTypeHorizontal;
|
||||
extern PyMethodDef PyHorizontal_Methods[];
|
||||
|
||||
extern PyObject* PyHorizontal_Link( Hurricane::Horizontal* object );
|
||||
extern void PyHorizontal_LinkPyType();
|
||||
extern void PyHorizontal_Constructor();
|
||||
extern PyObject* PyHorizontal_create ( PyObject* module, PyObject* args );
|
||||
extern PyObject* PyHorizontal_Link ( Hurricane::Horizontal* object );
|
||||
extern void PyHorizontal_LinkPyType ();
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -162,6 +162,7 @@ extern "C" {
|
|||
|
||||
// -------------------------------------------------------------------
|
||||
// Miscellaneous.
|
||||
#define DEFERRED_ADDRESS(ADDR) 0
|
||||
|
||||
|
||||
// This macro must be redefined in derived classes.
|
||||
|
@ -600,16 +601,6 @@ extern "C" {
|
|||
PyType##SELF_TYPE.tp_methods = Py##SELF_TYPE##_Methods; \
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Initialisation Function for PyTypeObject Runtime Link.
|
||||
// Special method to add constructor new function
|
||||
#define PyTypeObjectConstructor(SELF_TYPE) \
|
||||
extern void Py##SELF_TYPE##_Constructor() { \
|
||||
trace << "Py" #SELF_TYPE "_Constructor()" << endl; \
|
||||
\
|
||||
PyType##SELF_TYPE.tp_new = Py##SELF_TYPE##_new; \
|
||||
}
|
||||
|
||||
|
||||
// Special Initialisation Function for Locator PyTypeObject Runtime Link.
|
||||
#define LocatorPyTypeObjectLinkPyType(PY_SELF_TYPE, SELF_TYPE) \
|
||||
|
@ -650,11 +641,77 @@ extern "C" {
|
|||
, 0 /* tp_getattro. */ \
|
||||
, 0 /* tp_setattro. */ \
|
||||
, 0 /* tp_as_buffer. */ \
|
||||
, Py_TPFLAGS_DEFAULT /* tp_flags */ \
|
||||
, "#SELF_TYPE objects" /* tp_doc. */ \
|
||||
};
|
||||
|
||||
# define PyTypeRootObjectDefinitions(SELF_TYPE) \
|
||||
PyTypeObject PyType##SELF_TYPE = \
|
||||
{ PyObject_HEAD_INIT(&PyType_Type) \
|
||||
0 /* ob_size. */ \
|
||||
, "Hurricane.Py" #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 */ \
|
||||
, 0 /* tp_getattro. */ \
|
||||
, 0 /* tp_setattro. */ \
|
||||
, 0 /* tp_as_buffer. */ \
|
||||
, Py_TPFLAGS_DEFAULT \
|
||||
| Py_TPFLAGS_BASETYPE /* tp_flags. */ \
|
||||
, "#SELF_TYPE objects" /* tp_doc. */ \
|
||||
};
|
||||
|
||||
# define PyTypeInheritedObjectDefinitions(SELF_TYPE, INHERITED_TYPE) \
|
||||
PyTypeObject PyType##SELF_TYPE = \
|
||||
{ PyObject_HEAD_INIT(DEFERRED_ADDRESS(&PyType##INHERITED_TYPE)) \
|
||||
0 /* ob_size. */ \
|
||||
, "Hurricane.Py" #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 */ \
|
||||
, 0 /* tp_getattro. */ \
|
||||
, 0 /* tp_setattro. */ \
|
||||
, 0 /* tp_as_buffer. */ \
|
||||
, Py_TPFLAGS_DEFAULT \
|
||||
| Py_TPFLAGS_BASETYPE /* tp_flags. */ \
|
||||
, 0 /* tp_doc. */ \
|
||||
, 0 /* tp_traverse. */ \
|
||||
, 0 /* tp_clear. */ \
|
||||
, 0 /* tp_richcompare. */ \
|
||||
, 0 /* tp_weaklistoffset.*/ \
|
||||
, 0 /* tp_iter. */ \
|
||||
, 0 /* tp_iternext. */ \
|
||||
, 0 /* tp_methods. */ \
|
||||
, 0 /* tp_members. */ \
|
||||
, 0 /* tp_getset. */ \
|
||||
, DEFERRED_ADDRESS(&PyType##INHERITED_TYPE) \
|
||||
/* tp_base. */ \
|
||||
};
|
||||
|
||||
#define PyTypeCollectionObjectDefinitions(SELF_TYPE) \
|
||||
PyTypeObject PyType##SELF_TYPE = \
|
||||
{ PyObject_HEAD_INIT(NULL) \
|
||||
|
|
|
@ -81,8 +81,8 @@ extern "C" {
|
|||
extern PyTypeObject PyTypeHyperNet;
|
||||
extern PyMethodDef PyHyperNet_Methods[];
|
||||
|
||||
extern void PyHyperNet_LinkPyType();
|
||||
extern void PyHyperNet_Constructor();
|
||||
extern PyObject* PyHyperNet_create ( PyObject* module, PyObject* args );
|
||||
extern void PyHyperNet_LinkPyType();
|
||||
|
||||
|
||||
#define IsPyHyperNet(v) ( (v)->ob_type == &PyTypeHyperNet )
|
||||
|
|
|
@ -87,10 +87,10 @@ extern "C" {
|
|||
extern PyTypeObject PyTypeInstance;
|
||||
extern PyMethodDef PyInstance_Methods[];
|
||||
|
||||
extern PyObject* PyInstance_Link(Hurricane::Instance* object);
|
||||
extern void InstanceLoadConstants(PyObject* dictionnary);
|
||||
extern void PyInstance_LinkPyType();
|
||||
extern void PyInstance_Constructor();
|
||||
extern PyObject* PyInstance_create ( PyObject* module, PyObject* args );
|
||||
extern PyObject* PyInstance_Link ( Hurricane::Instance* object);
|
||||
extern void InstanceLoadConstants ( PyObject* dictionnary );
|
||||
extern void PyInstance_LinkPyType ();
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -84,10 +84,10 @@ extern "C" {
|
|||
extern PyTypeObject PyTypeLibrary;
|
||||
extern PyMethodDef PyLibrary_Methods[];
|
||||
|
||||
extern PyObject* PyLibrary_GetLibrary ( PyObject* module );
|
||||
extern PyObject* PyLibrary_create ( PyObject* module, PyObject* args );
|
||||
extern PyObject* PyLibrary_getLibrary ( PyObject* module );
|
||||
extern PyObject* PyLibrary_Link ( Hurricane::Library* lib );
|
||||
extern void PyLibrary_LinkPyType ();
|
||||
extern void PyLibrary_Constructor();
|
||||
|
||||
|
||||
#define IsPyLibrary(v) ( (v)->ob_type == &PyTypeLibrary )
|
||||
|
|
|
@ -47,10 +47,10 @@ extern "C" {
|
|||
extern PyTypeObject PyTypeNet;
|
||||
extern PyMethodDef PyNet_Methods[];
|
||||
|
||||
extern PyObject* PyNet_Link(Hurricane::Net* object);
|
||||
extern void NetLoadConstants(PyObject* dictionnary);
|
||||
extern void PyNet_LinkPyType();
|
||||
extern void PyNet_Constructor();
|
||||
extern PyObject* PyNet_create ( PyObject* module, PyObject* args );
|
||||
extern PyObject* PyNet_Link ( Hurricane::Net* object );
|
||||
extern void NetLoadConstants ( PyObject* dictionnary );
|
||||
extern void PyNet_LinkPyType ();
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -84,8 +84,8 @@ extern "C" {
|
|||
extern PyTypeObject PyTypeOccurrence;
|
||||
extern PyMethodDef PyOccurrence_Methods[];
|
||||
|
||||
extern void PyOccurrence_LinkPyType();
|
||||
extern void PyOccurrence_Constructor();
|
||||
extern PyObject* PyOccurrence_create ( PyObject* module, PyObject* args );
|
||||
extern void PyOccurrence_LinkPyType ();
|
||||
|
||||
|
||||
#define IsPyOccurrence(v) ( (v)->ob_type == &PyTypeOccurrence )
|
||||
|
|
|
@ -29,9 +29,9 @@ extern "C" {
|
|||
extern PyTypeObject PyTypePad;
|
||||
extern PyMethodDef PyPad_Methods[];
|
||||
|
||||
extern PyObject* PyPad_create ( PyObject* module, PyObject* args );
|
||||
extern PyObject* PyPad_Link ( Hurricane::Pad* object );
|
||||
extern void PyPad_LinkPyType ();
|
||||
extern void PyPad_Constructor();
|
||||
|
||||
|
||||
#define IsPyPad(v) ( (v)->ob_type == &PyTypePad )
|
||||
|
|
|
@ -84,8 +84,8 @@ extern "C" {
|
|||
extern PyTypeObject PyTypePath;
|
||||
extern PyMethodDef PyPath_Methods[];
|
||||
|
||||
extern void PyPath_LinkPyType();
|
||||
extern void PyPath_Constructor();
|
||||
extern PyObject* PyPath_create ( PyObject* module, PyObject* args );
|
||||
extern void PyPath_LinkPyType ();
|
||||
|
||||
|
||||
#define IsPyPath(v) ( (v)->ob_type == &PyTypePath )
|
||||
|
|
|
@ -76,10 +76,10 @@ extern "C" {
|
|||
extern PyTypeObject PyTypePin;
|
||||
extern PyMethodDef PyPin_Methods[];
|
||||
|
||||
extern PyObject* PyPin_Link(Hurricane::Pin* object );
|
||||
extern void PinLoadConstants( PyObject* dictionnary );
|
||||
extern void PyPin_LinkPyType();
|
||||
extern void PyPin_Constructor();
|
||||
extern PyObject* PyPin_create ( PyObject* module, PyObject* args );
|
||||
extern PyObject* PyPin_Link (Hurricane::Pin* object );
|
||||
extern void PinLoadConstants ( PyObject* dictionnary );
|
||||
extern void PyPin_LinkPyType ();
|
||||
|
||||
|
||||
# define IsPyPin(v) ( (v)->ob_type == &PyTypePin )
|
||||
|
|
|
@ -85,8 +85,8 @@ extern "C" {
|
|||
extern PyTypeObject PyTypePoint;
|
||||
extern PyMethodDef PyPoint_Methods[];
|
||||
|
||||
extern PyObject* PyPoint_create ( PyObject* self, PyObject* args );
|
||||
extern void PyPoint_LinkPyType();
|
||||
extern void PyPoint_Constructor();
|
||||
|
||||
|
||||
# define IsPyPoint(v) ( (v)->ob_type == &PyTypePoint )
|
||||
|
|
|
@ -83,9 +83,9 @@ extern "C" {
|
|||
extern PyTypeObject PyTypeReference;
|
||||
extern PyMethodDef PyReference_Methods[];
|
||||
|
||||
extern PyObject* PyReference_create ( PyObject* module, PyObject* args );
|
||||
extern PyObject* PyReference_Link ( Hurricane::Reference* object );
|
||||
extern void PyReference_LinkPyType();
|
||||
extern void PyReference_Constructor();
|
||||
extern void PyReference_LinkPyType ();
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -85,9 +85,9 @@ extern "C" {
|
|||
extern PyTypeObject PyTypeTransformation;
|
||||
extern PyMethodDef PyTransformation_Methods[];
|
||||
|
||||
extern void TransformationLoadConstants(PyObject* dictionnary);
|
||||
extern void PyTransformation_LinkPyType();
|
||||
extern void PyTransformation_Constructor();
|
||||
extern PyObject* PyTransformation_create (PyObject* self, PyObject* args);
|
||||
extern void TransformationLoadConstants (PyObject* dictionnary);
|
||||
extern void PyTransformation_LinkPyType ();
|
||||
|
||||
|
||||
# define IsPyTransformation(v) ( (v)->ob_type == &PyTypeTransformation )
|
||||
|
|
|
@ -84,9 +84,9 @@ extern "C" {
|
|||
extern PyTypeObject PyTypeVertical;
|
||||
extern PyMethodDef PyVertical_Methods[];
|
||||
|
||||
extern PyObject* PyVertical_create ( PyObject* module, PyObject* args );
|
||||
extern PyObject* PyVertical_Link ( Hurricane::Vertical* object );
|
||||
extern void PyVertical_LinkPyType ();
|
||||
extern void PyVertical_Constructor();
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue