Diana
0.8.3
|
00001 /* ----------------------------------------------------------------------------- 00002 * Diana process modelling, simulation and analysis software 00003 * Copyright (c) 2005, Michael Krasnyk 00004 * All rights reserved. 00005 * 00006 * This file is a part of Diana process modelling, simulation and analysis software 00007 * 00008 * Diana is free software; you can redistribute it and/or modify it 00009 * under the terms of the GNU General Public License as published 00010 * by the Free Software Foundation (see accompanying file LICENSE) 00011 * ----------------------------------------------------------------------------- 00012 * $Id: IDianaReporting.hpp 8909 2009-10-29 13:01:45Z miha $ 00013 * ----------------------------------------------------------------------------- 00014 * Description: 00015 */ 00016 00017 #ifndef IDIANA_REPORTING_H 00018 #define IDIANA_REPORTING_H 00019 00020 #include <CapeOpen.hpp> 00021 00022 namespace Numeric { 00023 namespace Solvers { 00024 namespace NLPTasks { 00025 class DianaNLPTask; 00026 } 00027 } 00028 } 00029 00030 namespace Diana { 00031 00032 #ifndef SWIG 00033 enum SolverEvents { 00034 eventNone = 0, 00035 eventSetReportingInterface, 00036 eventRemoveReportingInterface, 00037 eventStart, 00038 eventStop, 00039 eventOneStep, 00040 eventError, 00041 eventNewChunk, 00042 eventOneEval, 00043 }; 00044 enum NLPTaskEvents { 00045 eventNLPNone = 0, 00046 eventNLPSetReportingInterface, 00047 eventNLPRemoveReportingInterface, 00048 eventNLPStartObjCalc, 00049 eventNLPStopObjCalc, 00050 eventNLPStepObjCalc, 00051 eventNLPErrorObjCalc, 00052 eventNLPInit, 00053 eventNLPAssing, 00054 }; 00055 #endif // SWIG 00056 00057 // forward declaration 00058 class IDianaNumericSolver; 00059 00060 class IDianaReporting : public Common::Identification::ICapeIdentification, public Common::Utilities::ICapeUtilities { 00061 public: 00062 virtual void Add(Common::Parameter::ICapeParameter *_parameter) 00063 throw (Common::Error::ECapeUnknown) = 0; 00064 00065 virtual void Remove(Common::Parameter::ICapeParameter *_parameter) 00066 throw (Common::Error::ECapeUnknown) = 0; 00067 00068 virtual void Remove(Common::Types::CapeLong index) 00069 throw (Common::Error::ECapeUnknown) = 0; 00070 00071 virtual void ClearData() 00072 throw (Common::Error::ECapeUnknown) = 0; 00073 00074 virtual void StartNewChunk() 00075 throw (Common::Error::ECapeUnknown) = 0; 00076 00077 virtual void WriteData(const Common::Types::CapeString& filename, const Common::Types::CapeString& format="") 00078 throw (Common::Error::ECapeUnknown) = 0; 00079 00080 virtual void WriteDataMatlab(const Common::Types::CapeString& filename) 00081 throw (Common::Error::ECapeUnknown) = 0; 00082 00083 #ifndef SWIG 00084 public: 00085 virtual void onSolverEvent(SolverEvents event, IDianaNumericSolver* solver) 00086 throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation) = 0; 00087 00088 virtual void onNLPTaskEvent(NLPTaskEvents event, Numeric::Solvers::NLPTasks::DianaNLPTask* solver) 00089 throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation) {} 00090 #endif // SWIG 00091 }; 00092 00093 class IDianaGraphicReporting : virtual public IDianaReporting { 00094 public: 00095 virtual void ShowCurvePlot(Common::Types::CapeString strX, Common::Types::CapeString strY, 00096 Common::Types::CapeString strZ=Common::Types::CapeStringUNDEFINED) 00097 throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) = 0; 00098 }; 00099 00100 class IDianaGraphicReporting2 : virtual public IDianaReporting { 00101 public: 00102 virtual void Add2DPlot(Common::Parameter::ICapeParameter *_x, 00103 Common::Parameter::ICapeParameter *_y, 00104 Common::Types::CapeString name = Common::Types::CapeStringUNDEFINED) = 0; 00105 virtual void AddSurface(Common::Parameter::ICapeParameter *_x, 00106 Common::Parameter::ICapeParameter *_y, 00107 Common::Parameter::ICapeParameter *_z, 00108 Common::Types::CapeString name = Common::Types::CapeStringUNDEFINED) = 0; 00109 virtual void Show2DPlots() = 0; 00110 }; 00111 00112 }; 00113 00114 #endif // IDIANA_REPORTING_H