casa
$Rev:20696$
|
00001 //# Pixon.h: Definition for Pixon 00002 //# Copyright (C) 1996,1997,1998,1999,2000,2001 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be adressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# 00027 //# $Id$ 00028 00029 #ifndef SYNTHESIS_IDL_H 00030 #define SYNTHESIS_IDL_H 00031 00032 #include <casa/Arrays/Vector.h> 00033 #include <casa/BasicSL/String.h> 00034 00035 #ifdef HAVE_IDL_LIB 00036 #include <casa/stdio.h> 00037 #include "export.h" 00038 #endif 00039 00040 namespace casa { //# NAMESPACE CASA - BEGIN 00041 00042 // <summary> A class to start IDL and execute commands, etc. 00043 // </summary> 00044 00045 // <use visibility=export> 00046 00047 // <reviewed reviewer="" date="" tests="" demos=""> 00048 00049 // <prerequisite> 00050 // <li> IDL libraries 00051 // </prerequisite> 00052 // 00053 // <etymology> 00054 // IDL is the class for running IDL from inside AIPS++ 00055 // </etymology> 00056 // 00057 // <synopsis> 00058 // We can start IDL, execute commands, send and retreive named 00059 // arrays, etc using this class. The initial use of this class 00060 // is to allow Pixon processing to be performed using the IDL 00061 // code. 00062 // </synopsis> 00063 // 00064 // <example> 00065 // </example> 00066 // 00067 // <motivation> 00068 // Get access to IDL functionality 00069 // </motivation> 00070 // 00071 // <todo asof="01/03/03"> 00072 // <ul> Add more interface functions 00073 // <ul> Turn into DO 00074 // </todo> 00075 00076 class IDL { 00077 public: 00078 00079 // The constructor will start IDL. 00080 IDL(Int options=0); 00081 00082 // Copy constructor 00083 IDL(const IDL &other); 00084 00085 // Assignment operator 00086 IDL &operator=(const IDL &other); 00087 00088 // The destructor will stop IDL. 00089 ~IDL(); 00090 00091 // Run a sequence of IDL commands 00092 Bool runCommands(const Vector<String>& commands, Bool log=True); 00093 00094 // Run a single IDL command 00095 Bool runCommand(const String& command, Bool log=True); 00096 00097 // Send an array to IDL and name it 00098 Bool sendArray(const Array<Float>& a, String aname); 00099 00100 // Get an array from IDL 00101 Array<Float> getArray(String aname); 00102 00103 // Get an scalar from IDL 00104 Float getFloat(String aname); 00105 00106 // Get an scalar from IDL 00107 Int getInt(String aname); 00108 00109 // Set the path inside IDL 00110 Bool setPath(const Vector<String>&); 00111 00112 protected: 00113 00114 char* getIDLName(const String); 00115 00116 #ifdef HAVE_IDL_LIB 00117 IDL_VPTR getPointer(const String); 00118 #endif 00119 00120 void ok(); 00121 00122 }; 00123 00124 } //# NAMESPACE CASA - END 00125 00126 #endif