OpenPetra
Free Administration Software for Non-Profits
Ict.Common.IO.TImportExportTextFile Class Reference

write and read a text file in a format that Petra 2.x uses More...

Public Member Functions

void StartWriting ()
 initialise the stringbuilder for writing a new file More...
 
string FinishWriting ()
 returns the string that has been assembled during all the previous write function calls More...
 
void InitReading (string[] ATextFileContents)
 pass the lines that should be parsed More...
 
bool EndOfFile ()
 is there more data to read? More...
 
bool CheckForKeyword (string AKeyword)
 this will check if the next item is the quoted keyword. if this is true, the parser will proceed to next item More...
 
void WriteLine ()
 insert a new line More...
 
void Write (string AValue)
 insert a string. will use quotes More...
 
string ReadString ()
 read a string. strip off the quotes. More...
 
void Write (bool AValue)
 write a boolean value More...
 
bool ReadBoolean ()
 read a boolean value More...
 
void Write (Int64 AValue)
 write an Int64 value More...
 
Int64 ReadInt64 ()
 read an Int64 value More...
 
Int64? ReadNullableInt64 ()
 read an Int64 value More...
 
Int32 ReadInt32 ()
 read an Int32 value More...
 
Int32? ReadNullableInt32 ()
 read an Int32 value More...
 
void Write (Decimal AValue)
 write a decimal value More...
 
decimal ReadDecimal ()
 read a Decimal value More...
 
void Write (DateTime ? AValue)
 write a date. if null, write questionmark More...
 
DateTime? ReadNullableDate ()
 read a DateTime value that can be null More...
 
void Write (DateTime AValue)
 write a date More...
 
DateTime ReadDate ()
 read a DateTime value More...
 

Properties

Int32 CurrentLineCounter [get]
 read the current line counter More...
 
string DATEFORMAT [get, set]
 Access the current Date Format for import / export More...
 
string CurrentLine [get]
 read the current line More...
 

Detailed Description

write and read a text file in a format that Petra 2.x uses

Member Function Documentation

◆ CheckForKeyword()

bool Ict.Common.IO.TImportExportTextFile.CheckForKeyword ( string  AKeyword)
inline

this will check if the next item is the quoted keyword. if this is true, the parser will proceed to next item

◆ EndOfFile()

bool Ict.Common.IO.TImportExportTextFile.EndOfFile ( )
inline

is there more data to read?

◆ FinishWriting()

string Ict.Common.IO.TImportExportTextFile.FinishWriting ( )
inline

returns the string that has been assembled during all the previous write function calls

◆ InitReading()

void Ict.Common.IO.TImportExportTextFile.InitReading ( string[]  ATextFileContents)
inline

pass the lines that should be parsed

◆ ReadBoolean()

bool Ict.Common.IO.TImportExportTextFile.ReadBoolean ( )
inline

read a boolean value

◆ ReadDate()

DateTime Ict.Common.IO.TImportExportTextFile.ReadDate ( )
inline

read a DateTime value

◆ ReadDecimal()

decimal Ict.Common.IO.TImportExportTextFile.ReadDecimal ( )
inline

read a Decimal value

◆ ReadInt32()

Int32 Ict.Common.IO.TImportExportTextFile.ReadInt32 ( )
inline

read an Int32 value

◆ ReadInt64()

Int64 Ict.Common.IO.TImportExportTextFile.ReadInt64 ( )
inline

read an Int64 value

◆ ReadNullableDate()

DateTime? Ict.Common.IO.TImportExportTextFile.ReadNullableDate ( )
inline

read a DateTime value that can be null

◆ ReadNullableInt32()

Int32? Ict.Common.IO.TImportExportTextFile.ReadNullableInt32 ( )
inline

read an Int32 value

◆ ReadNullableInt64()

Int64? Ict.Common.IO.TImportExportTextFile.ReadNullableInt64 ( )
inline

read an Int64 value

◆ ReadString()

string Ict.Common.IO.TImportExportTextFile.ReadString ( )
inline

read a string. strip off the quotes.

Returns

◆ StartWriting()

void Ict.Common.IO.TImportExportTextFile.StartWriting ( )
inline

initialise the stringbuilder for writing a new file

◆ Write() [1/6]

void Ict.Common.IO.TImportExportTextFile.Write ( bool  AValue)
inline

write a boolean value

Parameters
AValue

◆ Write() [2/6]

void Ict.Common.IO.TImportExportTextFile.Write ( DateTime ?  AValue)
inline

write a date. if null, write questionmark

Parameters
AValue

◆ Write() [3/6]

void Ict.Common.IO.TImportExportTextFile.Write ( DateTime  AValue)
inline

write a date

Parameters
AValue

◆ Write() [4/6]

void Ict.Common.IO.TImportExportTextFile.Write ( Decimal  AValue)
inline

write a decimal value

Parameters
AValue

◆ Write() [5/6]

void Ict.Common.IO.TImportExportTextFile.Write ( Int64  AValue)
inline

write an Int64 value

Parameters
AValue

◆ Write() [6/6]

void Ict.Common.IO.TImportExportTextFile.Write ( string  AValue)
inline

insert a string. will use quotes

Parameters
AValue

◆ WriteLine()

void Ict.Common.IO.TImportExportTextFile.WriteLine ( )
inline

insert a new line

Property Documentation

◆ CurrentLine

string Ict.Common.IO.TImportExportTextFile.CurrentLine
get

read the current line

◆ CurrentLineCounter

Int32 Ict.Common.IO.TImportExportTextFile.CurrentLineCounter
get

read the current line counter

◆ DATEFORMAT

string Ict.Common.IO.TImportExportTextFile.DATEFORMAT
getset

Access the current Date Format for import / export


The documentation for this class was generated from the following file: