This documenta- tion describes the current state of development.
Note that interfaces and functionality may still change.

Prokee Modules:
  A
  B
  C
  D
  E
  F
  G
  I
  L
  M
  N
  O
  P
  R
  S
  T
  U
  W

     open all    |    close all

GUI Elements:
  B
  C
  I
  M
  P
  R
  S
  T

     open all    |    close all

GUI Interactions:
  B
  F
  H
  S

     open all    |    close all

GUI Layouts:
  L

     open all    |    close all

Games/Demos:
  M

     open all    |    close all

Third Party Libraries:
  P
  F
  Z

     open all    |    close all

Information about this Website / Informationen zu dieser Webseite:
In case of any questions, or comments, please feel free to contact me via email at apoll500@gmail.com.

Module csv [Version: v01] (Interface AbsCsvField)

   [AbsCsvField]   [AbsCsvRecord]   [AbsCsvSettings]   [AbsCsvData]

Contents

Inheritance:
AbsCsvField
Implementations: CsvField

Constructors:
CsvField
AbsCsvField *createCsvField(AbsCsvSettings *s)

Methods:
load
int load(Reader *reader)
get
char *get()
set
void set(const char *val)
print (version 1)
void print(FILE *f)
print (version 2)
void print(FILE *f,const char *val)

Motivation


Constructors

   CsvField


Der Konstruktor setzt den Wert des Feldes auf "" (Leerstring). Rufen Sie die Methode load() auf um das nächste Feld aus der csv-Datei einzulesen. (Der eingelesene Wert wird in diesem Objekt als Wert des Feldes gespeichert.)

Constructor:
CsvField(AbsCsvSettings *s)

Factory Method:
AbsCsvField *AbsCsvFieldInterface::createCsvField(AbsCsvSettings *s)

Wrapper Class:
CsvFieldWrapper(AbsCsvSettings *s)

The static method AbsCsvFieldInterface::createCsvField creates a new instance of class CsvField.

Parameters:
Type Name Direction Description
AbsCsvSettings *sPointer to an instance of an implementation of AbsCsvSettings.
See csv:AbsCsvSettings.

Return value:
Returns an instance of CsvField.


Methods

   load


Liest das nächste Feld aus der csv-Datei. Der eingelesene Wert (String) wird in diesem Objekt als Wert des Feldes gespeichert. Diese Methode sollte nur einmal aufgerufen werden.

Signature:
int load(Reader *reader)

Parameters:
Type Name Direction Description
Reader *readerPointer to an instance of an implementation of Reader.
See reader:Reader.


Return value:
1 Es folgen weitere Felder.
0 Zeilenende erreicht. Es folgen weitere Zeilen.
-1 Dateiende erreicht


   get


Returns a pointer to the buffer which holds the value of the field.
The value is represented as null-terminated string.
Do not free the returned buffer.

Signature:
char *get()

Return value:
The value of the field.

   set


Sets the value of the field.

Signature:
void set(const char *val)

Parameters:
Type Name Direction Description
const char *val[IN]The null-terminated string, that should be stored as the new value of this field.
The method copies this string into the buffer of this field.


   print (version 1)


Schreibt das Feld in die Datei f.

Diese Methode ruft die Methode print (version 2) auf.

Signature:
void print(FILE *f)

Parameters:
Type Name Direction Description
FILE *fHandle auf eine zum Schreiben geöffnete Datei.


   print (version 2)


This method writes value val formatted as a csv value to file f.

Es wird val entweder unverändert ausgegeben, oder falls erforderlich unter Anführungszeichen (bzw. mit String-Markierngs-Symbolen versehen, wie durch string_marker_out festgelegt).

Beispiele:
a) Hello Wolrd! wird unverändert ausgegeben als Hello Wolrd!.
b) red, green and blue wird ausgegeben als "red, green and blue".
c) "Hallo" wird ausgegeben als """Hallo""".

Signature:
void print(FILE *f,const char *val)

Parameters:
Type Name Direction Description
FILE *fHandle auf eine zum Schreiben geöffnete Datei.
const char *val[IN]The null-terminated string, that should be printed as the value of the field. (The string currently stored as the value of this field is ignored.)



Copyright © 2017 - 2019 by Andreas Pollhammer