ColPack
ColPack::StringTokenizer Class Reference

class StringTokenizer in group4. More...

#include <StringTokenizer.h>

List of all members.

Public Member Functions

 StringTokenizer ()
 StringTokenizer (char *)
 StringTokenizer (char *, char *)
 StringTokenizer (string, char *)
 StringTokenizer (string, string)
 ~StringTokenizer ()
int CountTokens ()
int CountTokens (char *)
string GetDelimiterString () const
string GetFirstToken ()
string GetInputString () const
string GetLastToken ()
string GetNextToken ()
string GetNextToken (char *)
string GetToken (int)
int HasMoreTokens ()
int HasMoreTokens (char *)
int SetInputString (char *)
int SetDelimiterString (char *)

Private Attributes

string DelimiterString
string InputString
string TokenString

Detailed Description

class StringTokenizer in group4.

The string tokenizer class is provided as an utility class to assist in reading various matrix and graph format files. As an input file is read line by line as strings, this class is used to tokenize the lines with one or more tokenizing strings which are generally the separators used in the input file. The string tokens are then restored to the intended data format without losing the actual precision of the original data. A string tokenizer class can be instantiated with an input string and an input tokenizer string or character array.

Definition at line 37 of file StringTokenizer.h.


Constructor & Destructor Documentation

Definition at line 40 of file StringTokenizer.cpp.

ColPack::StringTokenizer::StringTokenizer ( char *  InputChar,
char *  DelimiterChar 
)

Definition at line 51 of file StringTokenizer.cpp.

ColPack::StringTokenizer::StringTokenizer ( string  InputChar,
char *  DelimiterChar 
)

Definition at line 65 of file StringTokenizer.cpp.

ColPack::StringTokenizer::StringTokenizer ( string  InputChar,
string  DelimiterChar 
)

Definition at line 78 of file StringTokenizer.cpp.


Member Function Documentation

Definition at line 97 of file StringTokenizer.cpp.

int ColPack::StringTokenizer::CountTokens ( char *  DelimiterChar)

Definition at line 157 of file StringTokenizer.cpp.

Definition at line 167 of file StringTokenizer.cpp.

Definition at line 175 of file StringTokenizer.cpp.

Definition at line 201 of file StringTokenizer.cpp.

Definition at line 225 of file StringTokenizer.cpp.

Referenced by ColPack::GraphInputOutput::ReadMeTiSAdjacencyGraph2().

Here is the caller graph for this function:

string ColPack::StringTokenizer::GetNextToken ( char *  DelimiterChar)

Definition at line 300 of file StringTokenizer.cpp.

string ColPack::StringTokenizer::GetToken ( int  TokenPosition)

Definition at line 309 of file StringTokenizer.cpp.

Definition at line 334 of file StringTokenizer.cpp.

Referenced by ColPack::GraphInputOutput::ReadMeTiSAdjacencyGraph2().

Here is the caller graph for this function:

int ColPack::StringTokenizer::HasMoreTokens ( char *  DelimiterChar)

Definition at line 341 of file StringTokenizer.cpp.

int ColPack::StringTokenizer::SetDelimiterString ( char *  DelimiterChar)

Definition at line 362 of file StringTokenizer.cpp.

int ColPack::StringTokenizer::SetInputString ( char *  InputChar)

Definition at line 350 of file StringTokenizer.cpp.


Member Data Documentation

Definition at line 41 of file StringTokenizer.h.

Definition at line 42 of file StringTokenizer.h.

Definition at line 43 of file StringTokenizer.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines