OpenPetra
Free Administration Software for Non-Profits
Ict.Petra.Shared.MReporting.TParameterList Class Reference

This class is a container class that holds an unlimited number of TParameter objects. It provides functions to add parameters of all possible types. It provides functions for retrieving the value of a given parameter, depending on column and level. The data can be stored to an xml file and loaded from an xml file. More...

Public Member Functions

 TParameterList ()
 Constructor initialises the member variable parameters More...
 
 TParameterList (TParameterList copy)
 Copy Constructor creates a copy of another ParameterList; this is required to be able to print and export to CSV with the correctly formatted dates More...
 
void Clear ()
 Clear all parameters from the current list More...
 
void LoadFromDataTable (System.Data.DataTable param)
 This loads the parameters from a datatable Mainly used for sending the parameters over a remote connection More...
 
System.Data.DataTable ToDataTable ()
 This stores the parameters into a datatable Mainly used for sending the parameters over a remote connection More...
 
void Copy (TParameterList AOtherList, int column, int depth, eParameterFit exact, int ADestColumn)
 Procedure to copy all parameters of one column from another parameter list; The column is first emptied in this parameter list, before the copying takes place. More...
 
void Copy (TParameterList AOtherList)
 copy the whole list More...
 
void Add (TParameterList AOtherList)
 add the parameters from another list, overwriting existing values, but not deleting parameters as Copy does More...
 
void CopyMissing (TParameterList AOtherList)
 add all parameters that do not have an equivalent in this parameter list More...
 
void Add (String parameterId, TVariant value, int column=-1, int depth=-1)
 Common procedure to add a parameter, expects the value as a variant More...
 
void Add (String parameterId, bool value, int column=-1, int depth=-1)
 Procedure to add a parameter of type Boolean More...
 
void Add (String parameterId, decimal value, int column=-1, int depth=-1)
 Procedure to add a parameter of type Decimal More...
 
void Add (String parameterId, String value, int column=-1, int depth=-1)
 Procedure to add a parameter of type String More...
 
void Add (String parameterId, System.DateTime value, int column=-1, int depth=-1)
 Procedure to add a parameter of type DateTime More...
 
void Add (String parameterId, System.Int32 value, int column=-1, int depth=-1)
 Procedure to add a parameter of type Int32 More...
 
void RemoveVariable (String AParameterId, int AColumn, int ADepth=-1, eParameterFit AExact=eParameterFit.eBestFit)
 Remove a variable; it will not exist anymore More...
 
void RemoveVariable (String AParameterId)
 remove variable completely from list, all occurrences More...
 
Boolean Exists (String parameterId, int column=-1, int depth=-1, eParameterFit exact=eParameterFit.eBestFit)
 Test if a value other than NOTFOUND would be returned More...
 
void Debug (String parameterId)
 Prints a message to log with all occurrences of the given variable in the parameter list This can be helpful for debugging. More...
 
TVariant Get (String parameterId, int column=-1, int depth=-1, eParameterFit exact=eParameterFit.eBestFit)
 Common procedure to retrieve a parameter of any type; will return a TVariant object More...
 
TVariant GetOrDefault (String parameterId, int column, TVariant ADefault)
 Common procedure to retrieve a parameter or a default value; will return a TVariant object More...
 
TParameter GetParameter (String parameterId, int column=-1, int depth=-1, eParameterFit exact=eParameterFit.eBestFit)
 Common procedure to retrieve a parameter of any type; will return a TParameter object More...
 
void Load (String filename)
 Read the parameters from a text file (json format); used for loading settings More...
 
void LoadFromJson (String jsonString)
 load from json More...
 
void Sort ()
 useful for storing the parameter lists and comparing in unit tests More...
 
string ToJson ()
 export to JSON More...
 
void Save (String filename)
 Write all the parameters to a text file (json format); used for storing settings More...
 
TParameterList ConvertToFormattedStrings (String AOutputType)
 This formats the dates for different output, for example printing More...
 
TParameterList ConvertToFormattedStrings ()
 overload, use Localized as default output type More...
 

Properties

ArrayList Elems [get]
 Get at the actual list. More...
 

Detailed Description

This class is a container class that holds an unlimited number of TParameter objects. It provides functions to add parameters of all possible types. It provides functions for retrieving the value of a given parameter, depending on column and level. The data can be stored to an xml file and loaded from an xml file.

Constructor & Destructor Documentation

◆ TParameterList() [1/2]

Ict.Petra.Shared.MReporting.TParameterList.TParameterList ( )
inline

Constructor initialises the member variable parameters

Returns
void

◆ TParameterList() [2/2]

Ict.Petra.Shared.MReporting.TParameterList.TParameterList ( TParameterList  copy)
inline

Copy Constructor creates a copy of another ParameterList; this is required to be able to print and export to CSV with the correctly formatted dates

Returns
void

Member Function Documentation

◆ Add() [1/7]

void Ict.Petra.Shared.MReporting.TParameterList.Add ( String  parameterId,
bool  value,
int  column = -1,
int  depth = -1 
)
inline

Procedure to add a parameter of type Boolean

Returns
void

◆ Add() [2/7]

void Ict.Petra.Shared.MReporting.TParameterList.Add ( String  parameterId,
decimal  value,
int  column = -1,
int  depth = -1 
)
inline

Procedure to add a parameter of type Decimal

Returns
void

◆ Add() [3/7]

void Ict.Petra.Shared.MReporting.TParameterList.Add ( String  parameterId,
String  value,
int  column = -1,
int  depth = -1 
)
inline

Procedure to add a parameter of type String

Returns
void

◆ Add() [4/7]

void Ict.Petra.Shared.MReporting.TParameterList.Add ( String  parameterId,
System.DateTime  value,
int  column = -1,
int  depth = -1 
)
inline

Procedure to add a parameter of type DateTime

Returns
void

◆ Add() [5/7]

void Ict.Petra.Shared.MReporting.TParameterList.Add ( String  parameterId,
System.Int32  value,
int  column = -1,
int  depth = -1 
)
inline

Procedure to add a parameter of type Int32

Returns
void

◆ Add() [6/7]

void Ict.Petra.Shared.MReporting.TParameterList.Add ( String  parameterId,
TVariant  value,
int  column = -1,
int  depth = -1 
)
inline

Common procedure to add a parameter, expects the value as a variant

◆ Add() [7/7]

void Ict.Petra.Shared.MReporting.TParameterList.Add ( TParameterList  AOtherList)
inline

add the parameters from another list, overwriting existing values, but not deleting parameters as Copy does

Parameters
AOtherList

◆ Clear()

void Ict.Petra.Shared.MReporting.TParameterList.Clear ( )
inline

Clear all parameters from the current list

Returns
void

◆ ConvertToFormattedStrings() [1/2]

TParameterList Ict.Petra.Shared.MReporting.TParameterList.ConvertToFormattedStrings ( )
inline

overload, use Localized as default output type

Returns

◆ ConvertToFormattedStrings() [2/2]

TParameterList Ict.Petra.Shared.MReporting.TParameterList.ConvertToFormattedStrings ( String  AOutputType)
inline

This formats the dates for different output, for example printing

Parameters
AOutputTypeif this is 'Localized' then the dates are formatted in the format DD-MMM-YYYY
Returns
s a new copy of the parameters, with the correct formatting

◆ Copy() [1/2]

void Ict.Petra.Shared.MReporting.TParameterList.Copy ( TParameterList  AOtherList)
inline

copy the whole list

Parameters
AOtherList

◆ Copy() [2/2]

void Ict.Petra.Shared.MReporting.TParameterList.Copy ( TParameterList  AOtherList,
int  column,
int  depth,
eParameterFit  exact,
int  ADestColumn 
)
inline

Procedure to copy all parameters of one column from another parameter list; The column is first emptied in this parameter list, before the copying takes place.

Returns
void

◆ CopyMissing()

void Ict.Petra.Shared.MReporting.TParameterList.CopyMissing ( TParameterList  AOtherList)
inline

add all parameters that do not have an equivalent in this parameter list

◆ Debug()

void Ict.Petra.Shared.MReporting.TParameterList.Debug ( String  parameterId)
inline

Prints a message to log with all occurrences of the given variable in the parameter list This can be helpful for debugging.

Returns
void

◆ Exists()

Boolean Ict.Petra.Shared.MReporting.TParameterList.Exists ( String  parameterId,
int  column = -1,
int  depth = -1,
eParameterFit  exact = eParameterFit.eBestFit 
)
inline

Test if a value other than NOTFOUND would be returned

Parameters
parameterId
column
depth
exactdetermines how strictly a match has to fit the request; can be eExact, eBestFit, eAllColumnFit, eBestFitEvenLowerLevel
Returns
true if the parameter exists in the current collection

◆ Get()

TVariant Ict.Petra.Shared.MReporting.TParameterList.Get ( String  parameterId,
int  column = -1,
int  depth = -1,
eParameterFit  exact = eParameterFit.eBestFit 
)
inline

Common procedure to retrieve a parameter of any type; will return a TVariant object

Returns
void

◆ GetOrDefault()

TVariant Ict.Petra.Shared.MReporting.TParameterList.GetOrDefault ( String  parameterId,
int  column,
TVariant  ADefault 
)
inline

Common procedure to retrieve a parameter or a default value; will return a TVariant object

Returns
void

◆ GetParameter()

TParameter Ict.Petra.Shared.MReporting.TParameterList.GetParameter ( String  parameterId,
int  column = -1,
int  depth = -1,
eParameterFit  exact = eParameterFit.eBestFit 
)
inline

Common procedure to retrieve a parameter of any type; will return a TParameter object

Returns
void

◆ Load()

void Ict.Petra.Shared.MReporting.TParameterList.Load ( String  filename)
inline

Read the parameters from a text file (json format); used for loading settings

Parameters
filenamerelative or absolute filename
Returns
void

◆ LoadFromDataTable()

void Ict.Petra.Shared.MReporting.TParameterList.LoadFromDataTable ( System.Data.DataTable  param)
inline

This loads the parameters from a datatable Mainly used for sending the parameters over a remote connection

Parameters
paramthe datatable that contains a collection of parameters
Returns
void

◆ LoadFromJson()

void Ict.Petra.Shared.MReporting.TParameterList.LoadFromJson ( String  jsonString)
inline

load from json

◆ RemoveVariable() [1/2]

void Ict.Petra.Shared.MReporting.TParameterList.RemoveVariable ( String  AParameterId)
inline

remove variable completely from list, all occurrences

Parameters
AParameterId

◆ RemoveVariable() [2/2]

void Ict.Petra.Shared.MReporting.TParameterList.RemoveVariable ( String  AParameterId,
int  AColumn,
int  ADepth = -1,
eParameterFit  AExact = eParameterFit.eBestFit 
)
inline

Remove a variable; it will not exist anymore

Returns
void

◆ Save()

void Ict.Petra.Shared.MReporting.TParameterList.Save ( String  filename)
inline

Write all the parameters to a text file (json format); used for storing settings

Parameters
filenamerelative or absolute filename

◆ Sort()

void Ict.Petra.Shared.MReporting.TParameterList.Sort ( )
inline

useful for storing the parameter lists and comparing in unit tests

◆ ToDataTable()

System.Data.DataTable Ict.Petra.Shared.MReporting.TParameterList.ToDataTable ( )
inline

This stores the parameters into a datatable Mainly used for sending the parameters over a remote connection

Returns
the datatable that contains a collection of parameters

◆ ToJson()

string Ict.Petra.Shared.MReporting.TParameterList.ToJson ( )
inline

export to JSON

Property Documentation

◆ Elems

ArrayList Ict.Petra.Shared.MReporting.TParameterList.Elems
get

Get at the actual list.


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