diff --git a/docs/doc-geo.txt b/docs/doc-geo.txt new file mode 100644 index 0000000..9b8251f --- /dev/null +++ b/docs/doc-geo.txt @@ -0,0 +1,101 @@ + +devil1geo.h / devil1geo.c + Handles files containing geometry. + +Functions + void printheader(struct Header*); + Show attributes and values of a Header for the package. + + input: pointer to Header, pass by reference of a struct. + Can not be NULL. + + void printmeshheader(struct MeshHeader*); + Show attributes and values of a MeshHeader. + + input: pointer to MeshHeader, pass by reference of a struct. + Can not be NULL. + + void printbatch(struct Batch*); + Show attribute and values of a Batch and three sample position + coordinates. + + input: pointer to Batch, pass by reference of a struct. + Can not be NULL. + + void printcoordinate(struct Coordinate*, unsigned int); + + input: + pointer to array of Coordinates. + Can not be NULL. + + unsigned int, for quantity of coordinates to be printed. + + + bool getmeshheader(struct MeshHeader**, + unsigned int, + const char * const); + Retrives the i-th MeshHeader in a buffer. + + input: + Pointer of a pointer to MeshHeader. + Pass by reference of a pointer to the function. + The pointer of MeshHeader can be NULL and will be set to point to + a region in the buffer. + + unsigned int, the i-th instance of MeshHeader in the buffer. + + const char*, the buffer containing the whole mesh package. + + output: + true on success. + + false when failing checks against segmentation faults. + If parameter 'struct MeshHeader**' is NULL. + If parameter 'const char*' is NULL. + + bool getbatch(struct Batch*, + unsigned int offset, + const char * const); + Retrives the i-th Batch in a buffer. + + input: + Pointer to a Batch. + Pass by reference of a struct to the function. + Can not be NULL. + + unsigned int, the i-th instance of Batch in the buffer. + + const char*, the buffer containing the whole mesh package. + + output: + true on success. + + false when failing checks against segmentation faults. + If parameter 'struct Batch*' is NULL. + If parameter 'const char*' is NULL. + + bool getmesh(struct Mesh*, + unsigned int, + const char*, + unsigned int); + Retrives the i-th Mesh in a buffer. + + input: + Pointer to mesh. + Pass by reference of a struct to the function. + + unsigned int, the i-th instance of Mesh in the buffer. + + const char*, the buffer containing the whole mesh package. + + output: + true on success. + + false when failing checks against segmentation faults. + If parameter 'struct Mesh*' is NULL. + If attribute 'b' of parameter 'struct Mesh' is NULL. + if parameter 'const char*' is NULL. + When file size is detected to be too small for a given i-th + Mesh. + + \ No newline at end of file