GRALESHELL
|
00001 /* 00002 00003 This file is a part of GRALESHELL, a program to facilitate the simulation 00004 and inversion of gravitational lenses, based on the GRALE library. 00005 00006 Copyright (C) 2008-2012 Jori Liesenborgs 00007 00008 Contact: jori.liesenborgs@gmail.com 00009 00010 This program is free software; you can redistribute it and/or modify 00011 it under the terms of the GNU General Public License as published by 00012 the Free Software Foundation; either version 2 of the License, or 00013 (at your option) any later version. 00014 00015 This program is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 GNU General Public License for more details. 00019 00020 You should have received a copy of the GNU General Public License 00021 along with this program; if not, write to the Free Software 00022 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00023 00024 */ 00025 00026 #ifndef CMDLENSPLANE_H 00027 00028 #define CMDLENSPLANE_H 00029 00030 #include <shellp/shellcommand.h> 00031 #include <shellp/shellcmdrealarg.h> 00032 #include <shellp/shellcmdintarg.h> 00033 #include <shellp/shellcmdstringarg.h> 00034 #include <shellp/shellcmdboolarg.h> 00035 00036 class CmdLensPlane : public shellp::ShellCommand 00037 { 00038 public: 00039 CmdLensPlane(const std::string &cmdname); 00040 ~CmdLensPlane(); 00041 protected: 00042 double GetX1() const { return x1arg->getValue(); } 00043 double GetX2() const { return x2arg->getValue(); } 00044 double GetY1() const { return y1arg->getValue(); } 00045 double GetY2() const { return y2arg->getValue(); } 00046 int GetNumX() const { return numxarg->getValue(); } 00047 int GetNumY() const { return numyarg->getValue(); } 00048 protected: 00049 shellp::ShellCmdRealArg *x1arg,*y1arg,*x2arg,*y2arg; 00050 shellp::ShellCmdIntArg *numxarg,*numyarg; 00051 }; 00052 00053 class CmdLensPlaneLocal : public CmdLensPlane 00054 { 00055 public: 00056 CmdLensPlaneLocal(const std::string &cmdname); 00057 ~CmdLensPlaneLocal(); 00058 bool execute(); 00059 }; 00060 00061 class CmdLensPlaneRemote : public CmdLensPlane 00062 { 00063 public: 00064 CmdLensPlaneRemote(const std::string &cmdname); 00065 ~CmdLensPlaneRemote(); 00066 bool execute(); 00067 private: 00068 shellp::ShellCmdStringArg *ipstrarg; 00069 shellp::ShellCmdIntArg *portarg; 00070 }; 00071 00072 class CmdLensPlaneSave : public shellp::ShellCommand 00073 { 00074 public: 00075 CmdLensPlaneSave(const std::string &cmdName); 00076 ~CmdLensPlaneSave(); 00077 bool execute(); 00078 private: 00079 shellp::ShellCmdStringArg *m_pFileArg; 00080 }; 00081 00082 class CmdLensPlaneLoad : public shellp::ShellCommand 00083 { 00084 public: 00085 CmdLensPlaneLoad(const std::string &cmdName); 00086 ~CmdLensPlaneLoad(); 00087 bool execute(); 00088 private: 00089 shellp::ShellCmdStringArg *m_pFileArg; 00090 }; 00091 00092 class CmdLensPlaneScale : public shellp::ShellCommand 00093 { 00094 public: 00095 CmdLensPlaneScale(const std::string &cmdName); 00096 ~CmdLensPlaneScale(); 00097 bool execute(); 00098 private: 00099 shellp::ShellCmdRealArg *m_pScaleArg; 00100 }; 00101 00102 class CmdLensPlanePlot : public shellp::ShellCommand 00103 { 00104 public: 00105 CmdLensPlanePlot(const std::string &cmdName); 00106 ~CmdLensPlanePlot(); 00107 protected: 00108 std::string getFileName() const { return m_pFileNameArg->getValue(); } 00109 double getX1() const { return m_pX1Arg->getValue(); } 00110 double getY1() const { return m_pY1Arg->getValue(); } 00111 double getX2() const { return m_pX2Arg->getValue(); } 00112 double getY2() const { return m_pY2Arg->getValue(); } 00113 int getNumX() const { return m_pNumXArg->getValue(); } 00114 int getNumY() const { return m_pNumYArg->getValue(); } 00115 00116 shellp::ShellCmdStringArg *m_pFileNameArg; 00117 shellp::ShellCmdRealArg *m_pX1Arg, *m_pY1Arg, *m_pX2Arg, *m_pY2Arg; 00118 shellp::ShellCmdIntArg *m_pNumXArg, *m_pNumYArg; 00119 }; 00120 00121 class CmdLensPlanePlotGnuplot : public CmdLensPlanePlot 00122 { 00123 public: 00124 CmdLensPlanePlotGnuplot(const std::string &cmdName); 00125 ~CmdLensPlanePlotGnuplot(); 00126 bool execute(); 00127 private: 00128 shellp::ShellCmdBoolArg *m_pArg3D, *m_pColorArg; 00129 shellp::ShellCmdStringArg *m_pXLabelArg, *m_pYLabelArg; 00130 }; 00131 00132 class CmdLensPlanePlotFITS : public CmdLensPlanePlot 00133 { 00134 public: 00135 CmdLensPlanePlotFITS(const std::string &cmdName); 00136 ~CmdLensPlanePlotFITS(); 00137 bool execute(); 00138 }; 00139 00140 #endif // CMDLENSPLANE_H 00141