Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

utils.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 1999  Carsten Winkelholz
00003 
00004 Address:  FGAN Forschungsgesellschaft fr Angewandte Naturwissenschaften e. V.
00005       Neuenahrer Str. 20
00006       D - 53343 Wachtberg
00007       
00008 Email:    winkelholz@fgan.de
00009 
00010 This program is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU General Public License
00012 as published by the Free Software Foundation; either version 2
00013 of the License, or (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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 */
00024 
00025 #ifndef ALLG_H
00026 #define ALLG_H
00027 
00028 #include <fstream>
00029 
00030 #include "matrixc.h"
00031 #include "vectorc.h"
00032 #include "stringc.h"
00033 #include "kettec.h"
00034 #include "arrayc.h"
00035 
00039 
00040 // Information about a node
00041 
00042 #define  SAFE_DELETE(x)      { if(x) delete x; x = 0; }
00043 
00044 #include "../oawconfig.h"
00045 #include "mapc.h"
00046 
00047 OAW_BEGIN_NAMESPACE
00048 
00049 class StringC;
00050 class TimeC;
00051 
00052 
00053 inline double sgn(double x){ if (x<0) { return -1; } else { return 1; } }  
00054 inline double abs(double x){ if (x<0) { return -x; } else { return x; } }   
00055 inline double absD(double x){ if (x<0) { return -x; } else { return x; } }   
00056 
00057 OAW_DLLMAPPING void schnitt(bool& kl,double& t,double&a,VectorC& v,VectorC& ap,VectorC& x,VectorC& v1,VectorC& v2);
00058 
00059 OAW_DLLMAPPING StringC DoubleToString(double x,short n1);
00060 OAW_DLLMAPPING StringC LongToString(long i);
00061 
00062 OAW_DLLMAPPING void CutPath(StringC&,StringC);
00063 
00064 OAW_DLLMAPPING void LeseZeile(char*& iter,const char* end);
00065 OAW_DLLMAPPING StringC GetLine(char*& iter,const char* end);
00066 
00067 OAW_DLLMAPPING short  ReadUntilFirst(const StringC&,char*&, const char*,long&,StringC*);
00068 OAW_DLLMAPPING long ReadUntilFirst(KetteC<StringC>&,char*&, const char*,long&);
00069 //long ReadUntilFirst(char[][30],long,char*&, const char*,long&);
00070 OAW_DLLMAPPING long ReadUntilFirst(char[][30],long,char*&, const char*,long&,StringC*);
00071 OAW_DLLMAPPING long ReadAndWriteUntilFirst(KetteC<StringC>&,char*&, const char*,std::ofstream&,long&);
00072 OAW_DLLMAPPING short  ReadAndWriteUntilFirst(StringC&,char*&, const char*,std::ofstream&,long&);
00073 
00074 OAW_DLLMAPPING StringC NextWord(char*&, const char*,long&);
00075 OAW_DLLMAPPING StringC NextWord(char*&, const char*,const StringC&,long&);
00076 OAW_DLLMAPPING StringC ReadAndWriteUntilNextWord(char*&, const char*,std::ofstream&,const StringC&,long&);
00077 
00078 OAW_DLLMAPPING double NextDouble(char*&, const char*,long&,short&,char);
00079 OAW_DLLMAPPING double NextDouble(char*&, const char*,long&);
00080 
00081 OAW_DLLMAPPING long NextLong(char*&, const char*,long&);
00082 OAW_DLLMAPPING long NextLong(char*&, const char*,long&,short&,char);
00083 
00084 OAW_DLLMAPPING StringC NextWord(std::ifstream&,long&,short&);
00085 OAW_DLLMAPPING StringC NextWord(std::ifstream&,const StringC&,long&,short&);
00086 OAW_DLLMAPPING double NextDouble(std::ifstream&,long&,short&,char);
00087 OAW_DLLMAPPING double NextDouble(std::ifstream&,long&,short&);
00088 OAW_DLLMAPPING long NextLong(std::ifstream&,long&,short&);
00089 OAW_DLLMAPPING long NextLong(std::ifstream&,long&,short&,char);
00090 //OAW_DLLMAPPING short  ReadUntilFirst(const StringC&,std::ifstream&,long&,StringC&);
00091 
00092 OAW_DLLMAPPING char* GetFile(const char* path, char*& iter, char*&iterEnd);
00093 
00094 OAW_DLLMAPPING void Beep(long, long);
00095 OAW_DLLMAPPING void Sleep(long);
00096 
00097 OAW_DLLMAPPING void moveFile(StringC fromFile,StringC toFile);
00098 
00099 OAW_DLLMAPPING OAW::ArrayC<OAW::StringC> ExtractArgv(const char* strIn);
00100 OAW_DLLMAPPING OAW::ArrayC<OAW::StringC> getArgvArray(int argc, char** argv);
00101 
00102 OAW_DLLMAPPING MapC<StringC,StringC> ReadTable(const StringC& file);
00103 
00104 OAW_END_NAMESPACE
00105 
00106 #endif
00107 
00108 
00109 

Generated on Tue Jul 29 14:24:15 2003 for Open ActiveWrl by doxygen1.3-rc2