helper.h

Go to the documentation of this file.
00001 
00003 /* FAU Discrete Event Systems Library (libfaudes)
00004 
00005    Copyright (C) 2006  Bernd Opitz
00006    Exclusive copyright is granted to Klaus Schmidt
00007 
00008    This library is free software; you can redistribute it and/or
00009    modify it under the terms of the GNU Lesser General Public
00010    License as published by the Free Software Foundation; either
00011    version 2.1 of the License, or (at your option) any later version.
00012 
00013    This library is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016    Lesser General Public License for more details.
00017 
00018    You should have received a copy of the GNU Lesser General Public
00019    License along with this library; if not, write to the Free Software
00020    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00021 
00022 
00023 #ifndef FAUDES_HELPER_H
00024 #define FAUDES_HELPER_H
00025 
00026 #include <cstdlib>
00027 #include <cstring>
00028 #include <string>
00029 #include <iostream>
00030 #include <sstream>
00031 #include <fstream>
00032 #include <limits>
00033 #include <iomanip>
00034 
00035 
00036 #include "definitions.h"
00037 #include "exception.h"
00038 
00039 namespace faudes {
00040 
00050 std::string ToStringInteger(long int number);
00051 
00052 
00062 std::string ToStringInteger16(long int number);
00063 
00073 std::string ToStringFloat(double number);
00074 
00075 
00088 std::string ExpandString(const std::string& rString, unsigned int len);
00089 
00101  std::string CollapsString(const std::string& rString, unsigned int len= FD_MAXCONTAINERNAME);
00102 
00103 
00116 Idx ToIdx(const std::string& rString);
00117 
00124 std::string FDVersionString();
00125 
00132 std::string FDPluginsString();
00133 
00140 std::string FDContributorsString();
00141 
00161 void ProcessDot(const std::string& rDotFile, const std::string& rOutFile, 
00162   const std::string& rOutFormat = "", const std::string& rDotExec = "dot");
00163 
00171 std::string CreateTempFile(void);
00172 
00173 
00180 bool RemoveFile(const std::string& rFileName);
00181 
00190 std::string ExtractPath(const std::string& rFullName);
00191 
00202 std::string PrependPath(const std::string& rPathName, const std::string& rFileName);
00203 
00204 
00214 void DebugToFile(const std::string& rFileName="tmp_faudes_debug.log");
00215 
00219 extern std::ofstream* pDebugFileStream;
00220 
00227  std::ostream* DebugStream(void);
00228 
00229 
00230 } // namespace faudes
00231 
00232 #endif
00233 

Generated on Mon Nov 10 08:13:14 2008 for libFAUDES 2.11v by  doxygen 1.4.4