Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

hbcistring.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           hbcistring.h  -  description
00003                              -------------------
00004     begin                : Sun Jul 1 2001
00005     copyright            : (C) 2001 by fabian kaiser
00006     email                : fabian.kaiser@gmx.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00034 #ifndef HBCISTRING_H
00035 #define HBCISTRING_H
00036 
00037 #include <stdio.h>
00038 #include <string>
00039 //#include <fstream>
00040 #include <openhbci/dllimport.h>
00041 
00042 using namespace std;
00043 
00044 namespace HBCI {
00045 
00051 class DLLIMPORT String : public string  {
00052  private:
00053     String();
00054     ~String();
00055  public:
00056 
00061     DLLIMPORT static string nextDE(const string &data, int startIndex=0);
00062 
00067     DLLIMPORT static string nextDEG(const string &data, int startIndex=0);
00068 
00073     DLLIMPORT static string nextSEG(const string &data, int startIndex=0);
00074 
00079     DLLIMPORT static string num2string(int number, bool fillWithZero = false, int length = 0);
00080 
00088     /*DLLIMPORT static string double2string(double number,
00089       int pre=8, int post=2);*/
00090 
00103     DLLIMPORT static double string2double(const string &data);
00104 
00109     DLLIMPORT static string escape(const string &unescaped);
00110 
00112     DLLIMPORT static string unEscape(const string &escaped);
00113 
00117     DLLIMPORT static string date2string();
00118 
00122     DLLIMPORT static string time2string();
00123 
00127     /*DLLIMPORT static bool toStream(ostream *f, const string &data);*/
00128 
00132     /*DLLIMPORT static string fromStream(istream *f);*/
00133 
00137     /*DLLIMPORT static string readWholeFile(const string &filename);*/
00138 
00142     DLLIMPORT static string transformToDTAUS0(const string &msg);
00143 
00147     DLLIMPORT static string transformToHBCIBinData(const string &data);
00148 
00153     DLLIMPORT static string extractBinData(const string &data);
00154 
00164     DLLIMPORT static string nextTLV(const string &data, int startIndex=0);
00165 
00170     DLLIMPORT static unsigned int typeTLV(const string &tlv);
00171 
00176     DLLIMPORT static int sizeTLV(const string &tlv);
00177 
00182     DLLIMPORT static string dataTLV(const string &tlv);
00183 
00188     DLLIMPORT static string newTLV(int tag, const string &data);
00189 
00195     DLLIMPORT static string dumpToString(const string &s);
00196 
00197     DLLIMPORT static const char *hbciSegmentName(const char *segment);
00198 
00206     DLLIMPORT static void simpleDump(const string &s, FILE *f=stderr);
00207 
00208 private:
00209 
00210     DLLIMPORT static int lengthOfBinaryData(const string &data, int startIndex);
00211 
00212 };
00213 
00214 } /* namespace HBCI */
00215 
00223 extern char* hbci_strdup(const char *c);
00230 extern char* hbci_strdup(const string &s);
00231 
00232 
00233 #endif
00234 

Generated on Mon Jun 23 13:41:07 2003 for openhbci by doxygen1.2.17