Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

report_api.c File Reference

API function implementations. More...

#include <assert.h>
#include "fret.h"
#include "common.h"
#include "gramstore.h"

Include dependency graph for report_api.c:


Functions

bool fret_getReport (const BufferId bufferId, const size_t offset, const size_t length, GramReport *const pReport)
 Retrieve an array of Grams that describe the data structure in a buffer(s).
bool fret_freeReport (GramReport *const pReport)
 Frees the memory that is dynamically allocated to a GramReport.

Detailed Description

API function implementations.


Function Documentation

bool fret_freeReport GramReport pReport  ) 
 

Frees the memory that is dynamically allocated to a GramReport.

Deallocates the memory that is allocated to the Gram array attached to a Gram report. This function should be passed a pointer to a GramReport object that was previously allocated using the function fret_getReport.

Parameters:
pReport is a pointer to a GramReport object.
Returns:
true if function completed successfully.

false if the library couldnīt deallocate the memory. Query cause with fret_getError().

See also:
fret_getReport

fret_getError

bool fret_getReport BufferId  bufferId,
size_t  offset,
size_t  length,
GramReport pReport
 

Retrieve an array of Grams that describe the data structure in a buffer(s).

Passes a Buffer Id to the library. If there are available Grams for this buffer, the data is returned as an array of Grams. If no Buffer Id is passed, the Grams for all Buffers are returned. There is also the option of specifying that only Grams for a range within a buffer or buffers are required using the offset and length.

Parameters:
bufferId identifies an individual buffer using its Buffer Id. If it is 0x0 then all Grams mustbe returned.
offset is start of range in buffer for which results will be returned.
length length is the length of the range within the buffer for which Grams will be returned. If the value is zero then results for the whole buffer will be returned and the previous parameter offset will be ignored.
pReport is a pointer to a struct that will hold the returned array of Grams. The client allocates the GramReport object and the library will allocate the memory for an array of Grams. The client must later call fret_freeReport to deallocate the array memory.
Returns:
true if function completed successfully.

false if the library couldnīt return any Grams. Query cause with fret_getError().

See also:
fret_freeReport

fret_getError


Generated on Thu Jan 19 18:59:24 2006 for FRET by  doxygen 1.4.4