#include <QStringList>
#include <QVariant>
+HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects()
+ : NCollection_Sequence<Handle_HYDROData_Entity>()
+{
+}
+
+HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects( const HYDROData_SequenceOfObjects& theSequence )
+ : NCollection_Sequence<Handle_HYDROData_Entity>( theSequence )
+{
+}
+
+HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects( const NCollection_Sequence<Handle_HYDROData_Entity>& theSequence )
+ : NCollection_Sequence<Handle_HYDROData_Entity>( theSequence )
+{
+}
+
+
static const Standard_GUID GUID_MUST_BE_UPDATED("80f2bb81-3873-4631-8ddd-940d2119f000");
IMPLEMENT_STANDARD_HANDLE(HYDROData_Entity,MMgt_TShared)
DEFINE_STANDARD_HANDLE(HYDROData_Entity, MMgt_TShared)
-typedef QMap<QString,Handle(Standard_Transient)> MapOfTreatedObjects;
+class MapOfTreatedObjects : public QMap<QString,Handle(Standard_Transient)>
+{
+};
-typedef NCollection_Sequence<Handle_HYDROData_Entity> HYDROData_SequenceOfObjects;
+class HYDRODATA_EXPORT HYDROData_SequenceOfObjects : public NCollection_Sequence<Handle_HYDROData_Entity>
+{
+public:
+ HYDROData_SequenceOfObjects();
+ HYDROData_SequenceOfObjects( const HYDROData_SequenceOfObjects& );
+ HYDROData_SequenceOfObjects( const NCollection_Sequence<Handle_HYDROData_Entity>& );
+};
///! Is Equal for HYDROData_Entity mapping
HYDRODATA_EXPORT bool IsEqual(const Handle_HYDROData_Entity& theObj1, const Handle_HYDROData_Entity& theObj2);
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#include "HYDROData_Tool.h"
-
-#include "HYDROData_ArtificialObject.h"
-#include "HYDROData_Image.h"
-#include "HYDROData_Iterator.h"
-#include "HYDROData_NaturalObject.h"
-#include "HYDROData_ShapesGroup.h"
-
+#include <HYDROData_Tool.h>
+#include <HYDROData_ArtificialObject.h>
+#include <HYDROData_Document.h>
+#include <HYDROData_Entity.h>
+#include <HYDROData_Iterator.h>
+#include <HYDROData_NaturalObject.h>
+#include <HYDROData_ShapesGroup.h>
+#include <QColor>
#include <QFile>
#include <QStringList>
#include <QTextStream>
-
-#include <limits>
-#include <gp_Pnt.hxx>
-#include <gp_Pln.hxx>
-#include <ElSLib.hxx>
-#include <TopAbs_State.hxx>
+#include <BRep_Tool.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepTopAdaptor_FClass2d.hxx>
-#include <BRep_Tool.hxx>
+#include <ElSLib.hxx>
#include <Geom_Curve.hxx>
+#include <gp_Pln.hxx>
+#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Shape.hxx>
#include <TopoDS_Wire.hxx>
-#include <TopExp_Explorer.hxx>
static int aMaxNameId = std::numeric_limits<int>::max();
{
return QString( (QChar*)theStr.ToExtString(), theStr.Length() );
}
+
+std::ostream& operator<<( std::ostream& theStream, const QString& theText )
+{
+ theStream << theText.toStdString();
+ return theStream;
+}
+
+std::ostream& operator<<( std::ostream& theStream, const QColor& theColor )
+{
+ theStream << "[" << theColor.red() << ", " << theColor.green() << ", " << theColor.blue() << "]";
+ return theStream;
+}
+
+std::ostream& operator<<( std::ostream& theStream, const TopoDS_Shape& theShape )
+{
+ theStream << "[" << theShape.TShape().operator->() << "]";
+ return theStream;
+}
+
+std::ostream& operator<<( std::ostream& theStream, const TopoDS_Face& theFace )
+{
+ theStream << "[" << theFace.TShape().operator->() << "]";
+ return theStream;
+}
+
+
#define HYDROData_Tool_HeaderFile
#include "HYDROData.h"
-#include "HYDROData_Entity.h"
-
-#include <Precision.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <QString>
#include <QStringList>
-#include <gp_XY.hxx>
-#include <TopoDS_Face.hxx>
+#include <Precision.hxx>
+class Handle_HYDROData_Document;
+class Handle_HYDROData_Entity;
+class HYDROData_SequenceOfObjects;
+class MapOfTreatedObjects;
+class gp_XY;
+class QColor;
class QFile;
-class TopoDS_Shape;
-class TopTools_SequenceOfShape;
-class Handle(HYDROData_Document);
+class TCollection_ExtendedString;
+enum TopAbs_State;
class TopoDS_Edge;
+class TopoDS_Face;
+class TopoDS_Shape;
class TopoDS_Wire;
+class TopTools_SequenceOfShape;
class HYDRODATA_EXPORT HYDROData_Tool {
* Enables "MustBeUpdated" flag for objects that are depended on "MustBeUpdated" objects.
* \param theDoc document where this operation is performed
*/
- static void SetMustBeUpdatedObjects( const Handle(HYDROData_Document)& theDoc );
+ static void SetMustBeUpdatedObjects( const Handle_HYDROData_Document& theDoc );
/**
* \brief Generate name for new object.
* \param theIsTryToUsePurePrefix if true - the prefix will be returned if the name equal to the prefix is not busy
* \return generated name
*/
- static QString GenerateObjectName( const Handle(HYDROData_Document)& theDoc,
- const QString& thePrefix,
- const QStringList& theUsedNames = QStringList(),
- const bool theIsTryToUsePurePrefix = false );
+ static QString GenerateObjectName( const Handle_HYDROData_Document& theDoc,
+ const QString& thePrefix,
+ const QStringList& theUsedNames = QStringList(),
+ const bool theIsTryToUsePurePrefix = false );
/**
* \brief Checks the type of object.
* \param theObject object to check
* \return true if object is geometry object
*/
- static bool IsGeometryObject( const Handle(HYDROData_Entity)& theObject );
+ static bool IsGeometryObject( const Handle_HYDROData_Entity& theObject );
/**
* \brief Updates the child object name.
*/
static void UpdateChildObjectName( const QString& theOldStr,
const QString& theNewStr,
- const Handle(HYDROData_Entity)& theObject );
+ const Handle_HYDROData_Entity& theObject );
/**
return theFirst <= theSecond || ValuesEquals( theFirst, theSecond );
}
-
-
+HYDRODATA_EXPORT std::ostream& operator<<( std::ostream& theStream, const QString& theText );
+HYDRODATA_EXPORT std::ostream& operator<<( std::ostream& theStream, const QColor& theText );
+HYDRODATA_EXPORT std::ostream& operator<<( std::ostream& theStream, const TopoDS_Shape& theShape );
+HYDRODATA_EXPORT std::ostream& operator<<( std::ostream& theStream, const TopoDS_Face& theFace );
#endif
#include <SUIT_Session.h>
#include <QApplication>
#include <QColor>
-
-std::ostream& operator<<( std::ostream& theStream, const QString& theText )
-{
- theStream << theText.toStdString();
- return theStream;
-}
-
-std::ostream& operator<<( std::ostream& theStream, const QColor& theColor )
-{
- theStream << "[" << theColor.red() << ", " << theColor.green() << ", " << theColor.blue() << "]";
- return theStream;
-}
#include <time.h>
int main( int argc, char* argv[] )
return 0;
}
- //anApp.exec();
+ anApp.exec();
return result.wasSuccessful() ? 0 : 1;
}
#include <test_HYDROData_StricklerTable.h>
#include <HYDROData_Document.h>
#include <HYDROData_StricklerTable.h>
+#include <HYDROData_Tool.h>
#include <QStringList>
#include <QColor>
#include <QDir>
-#include <operators.h>
const QString DEF_STR_PATH = qgetenv( "HYDRO_ROOT_DIR" ) + "/share/salome/resources/hydro/def_strickler_table.txt";