QStringList HYDROData_AltitudeObject::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
QString anAltitudeName = GetName();
// TODO
QStringList HYDROData_Bathymetry::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
QString aBathymetryName = GetName();
aResList << QString( "%1.SetAltitudesInverted( %2 );" )
QStringList HYDROData_CalculationCase::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
QString aCalculName = GetName();
HYDROData_SequenceOfObjects aGeomObjects = GetGeometryObjects();
QStringList HYDROData_Channel::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
// TODO
QStringList HYDROData_Confluence::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
// TODO
QStringList HYDROData_Digue::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
// TODO
}
QStringList HYDROData_Entity::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
+{
+ QStringList anEmptyList;
+ return anEmptyList;
+}
+
+QStringList HYDROData_Entity::dumpObjectCreation( MapOfTreatedObjects& theTreatedObjects ) const
{
QStringList aResList;
const Handle(HYDROData_Entity)& theRefObject,
const QString& theMethod ) const;
+ /**
+ * Dump the initial object creation to a Python script.
+ * You should call it from DumpToPython implementation before
+ * dumping fields of the object.
+ */
+ QStringList dumpObjectCreation( MapOfTreatedObjects& theTreatedObjects ) const;
+
+ /**
+ * Returns an object type name as a string for dumping to Python.
+ */
QString HYDROData_Entity::getPyTypeID() const;
protected:
QStringList HYDROData_Image::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
QString anImageName = GetName();
QString aFilePath = GetFilePath();
QStringList HYDROData_ImmersibleZone::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
QString aZoneName = GetName();
QColor aFillingColor = GetFillingColor();
QStringList HYDROData_Obstacle::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
// TODO
QStringList HYDROData_ObstacleAltitude::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
// TODO
QStringList HYDROData_Polyline3D::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
// TODO
QStringList HYDROData_PolylineXY::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
QString aPolylineName = GetName();
// Set polilyne data
QStringList HYDROData_Profile::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
//TODO
QStringList HYDROData_Region::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
QString aRegionName = GetName();
HYDROData_SequenceOfObjects aZones = GetZones();
QStringList HYDROData_River::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
// TODO
QStringList HYDROData_Stream::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
// TODO
QStringList HYDROData_StreamAltitude::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
// TODO
QStringList HYDROData_Zone::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
HYDROData_SequenceOfObjects aGeomObjects = GetGeometryObjects();
HYDROData_SequenceOfObjects::Iterator aGeomObjsIter( aGeomObjects );