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

HBCI::String Class Reference

Some static methods to manipulate strings. More...

#include <hbcistring.h>

List of all members.

Static Public Methods

DLLIMPORT string nextDE (const string &data, int startIndex=0)
DLLIMPORT string nextDEG (const string &data, int startIndex=0)
DLLIMPORT string nextSEG (const string &data, int startIndex=0)
DLLIMPORT string num2string (int number, bool fillWithZero=false, int length=0)
DLLIMPORT double string2double (const string &data)
DLLIMPORT string escape (const string &unescaped)
DLLIMPORT string unEscape (const string &escaped)
DLLIMPORT string date2string ()
DLLIMPORT string time2string ()
DLLIMPORT string transformToDTAUS0 (const string &msg)
DLLIMPORT string transformToHBCIBinData (const string &data)
DLLIMPORT string extractBinData (const string &data)
DLLIMPORT string nextTLV (const string &data, int startIndex=0)
DLLIMPORT unsigned int typeTLV (const string &tlv)
DLLIMPORT int sizeTLV (const string &tlv)
DLLIMPORT string dataTLV (const string &tlv)
DLLIMPORT string newTLV (int tag, const string &data)
DLLIMPORT string dumpToString (const string &s)
DLLIMPORT const char * hbciSegmentName (const char *segment)
DLLIMPORT void simpleDump (const string &s, FILE *f=stderr)


Detailed Description

Some static methods to manipulate strings.

This class offers some (only static) methods to operate on strings.

Author:
fabian kaiser


Member Function Documentation

DLLIMPORT string HBCI::String::dataTLV const string &    tlv [static]
 

Returns the data of a tag.

Author:
Martin Preuss<openhbci@aquamaniac.de>

DLLIMPORT string HBCI::String::date2string   [static]
 

returns a string-represenation of the current date (YYYYMMDD)

DLLIMPORT string HBCI::String::dumpToString const string &    s [static]
 

Creates a human-readable version of the HBCI string, i.e. strips out binary data and replaces it with simple placeholder. Used for debugging purposes.

DLLIMPORT string HBCI::String::escape const string &    unescaped [static]
 

int the hbci-protocol, some characters have special meanings (eg +, ?, : ,').
thus you can use them by escaping each occurence with a '?'

DLLIMPORT string HBCI::String::extractBinData const string &    data [static]
 

return the data stored in a hbci-string eg <@23@lkasd083lkn23., ihpoh>

Exceptions:
HBCIMessage  *

DLLIMPORT const char* HBCI::String::hbciSegmentName const char *    segment [static]
 

DLLIMPORT string HBCI::String::newTLV int    tag,
const string &    data
[static]
 

Creates a new TLV.

Author:
Martin Preuss<openhbci@aquamaniac.de>

DLLIMPORT string HBCI::String::nextDE const string &    data,
int    startIndex = 0
[static]
 

return the next DE (DatenElement, see HBCI-Specification) from a given startIndex on

DLLIMPORT string HBCI::String::nextDEG const string &    data,
int    startIndex = 0
[static]
 

return the next DE (DatenElementGruppe, see HBCI-Specification) from a given startIndex on

DLLIMPORT string HBCI::String::nextSEG const string &    data,
int    startIndex = 0
[static]
 

return the next SEG (Segment, see HBCI-Specification) from a given startIndex on

DLLIMPORT string HBCI::String::nextTLV const string &    data,
int    startIndex = 0
[static]
 

Returns the TLV starting at startIndex. A TLV is a special string, whose first two bytes have a special meaning: Byte 0=Tag (whatever value you like) Byte 1=Length of the data part Bytes 2-x=Value

Author:
Martin Preuss<openhbci@aquamaniac.de>

DLLIMPORT string HBCI::String::num2string int    number,
bool    fillWithZero = false,
int    length = 0
[static]
 

converts a number to a string fills new string with <0> from the left side if <fillWithZero>==true and <length> > 0

DLLIMPORT void HBCI::String::simpleDump const string &    s,
FILE *    f = stderr
[static]
 

Simply dumps a string both hex and ASCII dump. Does not interprete the data in any way.

Author:
Martin Preuss<openhbci@aquamaniac.de>
Parameters:
s  string to dump
f  FILE handle to dump this to.

DLLIMPORT int HBCI::String::sizeTLV const string &    tlv [static]
 

Returns the size of the data in the TLV.

Author:
Martin Preuss<openhbci@aquamaniac.de>

DLLIMPORT double HBCI::String::string2double const string &    data [static]
 

Converts a string into a double, according to HBCI specification.

This method follows exactly the same behavior as the string-valued constructor of HBCI::Value, so please see the details there.

For example, the HBCI-format "4000," is converted to the double value "4000.0".

In case of format errors, a HBCI::Error is thrown.

DLLIMPORT string HBCI::String::time2string   [static]
 

returns a string-represenation of the current time (HHMMSS)

DLLIMPORT string HBCI::String::transformToDTAUS0 const string &    msg [static]
 

transform given text to the dtaus0-format

DLLIMPORT string HBCI::String::transformToHBCIBinData const string &    data [static]
 

wrap data with <length-of-data><data>

DLLIMPORT unsigned int HBCI::String::typeTLV const string &    tlv [static]
 

Returns the type of the tag (tag number).

Author:
Martin Preuss<openhbci@aquamaniac.de>

DLLIMPORT string HBCI::String::unEscape const string &    escaped [static]
 

See also:
escape


The documentation for this class was generated from the following file:
Generated on Mon Jun 23 13:41:18 2003 for openhbci by doxygen1.2.17