dllmain.cpp File Reference
#include "frepple.h"
#include "freppleinterface.h"
#include <sys/stat.h>
Include dependency graph for dllmain.cpp:

Go to the source code of this file.

Macros

#define FREPPLE_CORE
 

Functions

void FreppleExit ()
 
void FreppleInitialize ()
 
void FreppleLog (const string &msg)
 
void FreppleLog (const char *msg)
 
void FreppleReadPythonFile (const char *filename)
 
void FreppleReadXMLData (const char *x, bool validate, bool validateonly)
 
void FreppleReadXMLFile (const char *filename, bool validate, bool validateonly)
 
void FreppleSaveFile (const char *x)
 
const char * FreppleVersion ()
 
int FreppleWrapperExit ()
 
int FreppleWrapperInitialize ()
 
int FreppleWrapperReadPythonFile (const char *f)
 
int FreppleWrapperReadXMLData (char *d, bool v, bool c)
 
int FreppleWrapperReadXMLFile (const char *f, bool v, bool c)
 
int FreppleWrapperSaveFile (char *f)
 
PyMODINIT_FUNC initfrepple (void)
 

Macro Definition Documentation

#define FREPPLE_CORE

Definition at line 21 of file dllmain.cpp.

Function Documentation

void FreppleExit ( )

Closing any resources still used by frePPle.
Allocated memory is not freed up with this call - for performance reasons it is easier to "leak" the memory. The memory is freed when the process exits.

Definition at line 128 of file dllmain.cpp.

void FreppleInitialize ( )

This function should be called once when the client application starts, and before calling any other function in the API.

This method is synchronous, i.e. it returns only when the complete processing is finished. The method can throw exceptions, and the client is responsible for defining the correct handlers for these.

Definition at line 34 of file dllmain.cpp.

void FreppleLog ( const std::string &  )

Echo a message in the frePPLe log stream (which is either a file or the standard output stream).

This function is only available when using C++. The same functionality is available to C with the function FreppleLog(const char*).

Definition at line 135 of file dllmain.cpp.

void FreppleLog ( const char *  )

Echo a message in the frePPLe log stream (which is either a file or the standard output stream).

Definition at line 141 of file dllmain.cpp.

void FreppleReadPythonFile ( const char *  )

Execute the Python code in a file.

This method is synchroneous, i.e. it returns only when the complete processing is finished. The method can throw exceptions, and the client is responsible for defining the correct handlers for these.

Definition at line 108 of file dllmain.cpp.

void FreppleReadXMLData ( const char *  ,
bool  ,
bool   
)

The character buffer pointed to by the first parameter contains data in XML format that is passed on to frePPLe for processing.
The second argument specifies whether frePPLe should validate the data against the XSD schema.
The last argument specifies whether frePPLe needs to perform only the validation and skip the actual processing.

The client is responsible for the memory management in the data buffer.

This method is synchroneous, i.e. it returns only when the complete processing is finished. The method can throw exceptions, and the client is responsible for defining the correct handlers for these.

Definition at line 77 of file dllmain.cpp.

void FreppleReadXMLFile ( const char *  ,
bool  ,
bool   
)

The first parameter is the name of a file that contains data in XML format for frePPLe processing. If a NULL pointer is passed, frepple will read from the standard input.
The second argument specifies whether frePPLe should validate the data against the XSD schema.
The last argument specifies whether frePPLe needs to perform only the validation and skip the actual processing.

This method is synchroneous, i.e. it returns only when the complete processing is finished. The method can throw exceptions, and the client is responsible for defining the correct handlers for these.

Definition at line 87 of file dllmain.cpp.

void FreppleSaveFile ( const char *  )

Calling this function will save the frePPLe data in the file that is passed as the argument.

This method is synchroneous, i.e. it returns only when the complete processing is finished. The method can throw exceptions, and the client is responsible for defining the correct handlers for these.

Definition at line 116 of file dllmain.cpp.

const char* FreppleVersion ( )

This method returns a version string.

Definition at line 28 of file dllmain.cpp.

int FreppleWrapperExit ( )

Same as FreppleExit, but catches all exceptions and returns a status instead.

Use this function when calling the library from C or VB applications.

See Also
FreppleExit

Definition at line 187 of file dllmain.cpp.

int FreppleWrapperInitialize ( )

Same as FreppleInitialize, but catches all exceptions and returns a status instead.

Use this function when calling the library from C or VB applications.

See Also
FreppleInitialize

Definition at line 147 of file dllmain.cpp.

int FreppleWrapperReadPythonFile ( const char *  )

Same as FreppleReadPythonFile, but catches all exceptions and returns a status instead.

Use this function when calling the library from C or VB applications.

See Also
FreppleReadPythonFile

Definition at line 171 of file dllmain.cpp.

int FreppleWrapperReadXMLData ( char *  ,
bool  ,
bool   
)

Same as FreppleReadXMLData, but catches all exceptions and returns a status instead.

Use this function when calling the library from C or VB applications.

See Also
FreppleReadXMLData

Definition at line 155 of file dllmain.cpp.

int FreppleWrapperReadXMLFile ( const char *  ,
bool  ,
bool   
)

Same as FreppleReadXMLFile, but catches all exceptions and returns a status instead.

Use this function when calling the library from C or VB applications.

See Also
FreppleReadXMLFile

Definition at line 163 of file dllmain.cpp.

int FreppleWrapperSaveFile ( char *  )

Same as FreppleSaveFile, but catches all exceptions and returns a status instead.

Use this function when calling the library from C or VB applications.

See Also
FreppleSaveFile

Definition at line 179 of file dllmain.cpp.

PyMODINIT_FUNC initfrepple ( void  )

Used to initialize frePPLe as a Python extension module.

Definition at line 199 of file dllmain.cpp.