OpenScop  0.9.0
Data Structures | Defines | Typedefs | Functions
clay.h File Reference
#include <stdio.h>
#include <osl/interface.h>
Include dependency graph for clay.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  osl_clay

Defines

#define OSL_URI_CLAY   "clay"

Typedefs

typedef struct osl_clay osl_clay_t
typedef struct osl_clayosl_clay_p

Functions

void osl_clay_idump (FILE *, osl_clay_p, int)
void osl_clay_dump (FILE *, osl_clay_p)
char * osl_clay_sprint (osl_clay_p)
osl_clay_p osl_clay_sread (char **)
osl_clay_p osl_clay_malloc ()
void osl_clay_free (osl_clay_p)
osl_clay_p osl_clay_clone (osl_clay_p)
int osl_clay_equal (osl_clay_p, osl_clay_p)
osl_interface_p osl_clay_interface ()

Define Documentation

#define OSL_URI_CLAY   "clay"

Definition at line 76 of file clay.h.

Referenced by osl_clay_interface().


Typedef Documentation

typedef struct osl_clay* osl_clay_p

Definition at line 87 of file clay.h.

typedef struct osl_clay osl_clay_t

Definition at line 86 of file clay.h.


Function Documentation

osl_clay_clone function: this function builds and returns a "hard copy" (not a pointer copy) of an osl_clay_t data structure.

Parameters:
[in]clayThe pointer to the clay structure to clone.
Returns:
A pointer to the clone of the clay structure.

Definition at line 257 of file clay.c.

References osl_clay_malloc(), OSL_strdup, and osl_clay::script.

Referenced by osl_clay_interface().

void osl_clay_dump ( FILE *  file,
osl_clay_p  clay 
)

osl_clay_dump function: this function prints the content of an osl_clay_t structure (*clay) into a file (file, possibly stdout).

Parameters:
[in]fileThe file where the information has to be printed.
[in]clayThe clay structure to print.

Definition at line 130 of file clay.c.

References osl_clay_idump().

int osl_clay_equal ( osl_clay_p  c1,
osl_clay_p  c2 
)

osl_clay_equal function: this function returns true if the two clay structures are the same (content-wise), false otherwise.

Parameters:
[in]c1The first clay structure.
[in]c2The second clay structure.
Returns:
1 if c1 and c2 are the same (content-wise), 0 otherwise.

Definition at line 278 of file clay.c.

References OSL_info, and osl_clay::script.

Referenced by osl_clay_interface().

void osl_clay_free ( osl_clay_p  clay)

osl_clay_free function: this function frees the allocated memory for an osl_clay_t structure.

Parameters:
[in,out]clayThe pointer to the clay structure to free.

Definition at line 236 of file clay.c.

References osl_clay::script.

Referenced by osl_clay_interface().

void osl_clay_idump ( FILE *  file,
osl_clay_p  clay,
int  level 
)

osl_clay_idump function: this function displays an osl_clay_t structure (*clay) into a file (file, possibly stdout) in a way that trends to be understandable. It includes an indentation level (level) in order to work with others idump functions.

Parameters:
[in]fileThe file where the information has to be printed.
[in]clayThe clay structure to print.
[in]levelNumber of spaces before printing, for each line.

Definition at line 88 of file clay.c.

References OSL_strdup, and osl_clay::script.

Referenced by osl_clay_dump(), and osl_clay_interface().

osl_clay_interface function: this function creates an interface structure corresponding to the clay extension and returns it).

Returns:
An interface structure for the clay extension.

Definition at line 302 of file clay.c.

References osl_clay_clone(), osl_clay_equal(), osl_clay_free(), osl_clay_idump(), osl_clay_malloc(), osl_clay_sprint(), osl_clay_sread(), osl_interface_malloc(), OSL_strdup, and OSL_URI_CLAY.

Referenced by osl_interface_get_default_registry().

osl_clay_malloc function: this function allocates the memory space for an osl_clay_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.

Returns:
A pointer to an empty clay structure with fields set to default values.

Definition at line 220 of file clay.c.

References OSL_malloc, and osl_clay::script.

Referenced by osl_clay_clone(), osl_clay_interface(), and osl_clay_sread().

char* osl_clay_sprint ( osl_clay_p  clay)

osl_clay_sprint function: this function prints the content of an osl_clay_t structure (*clay) into a string (returned) in the OpenScop textual format.

Parameters:
[in]clayThe clay structure to print.
Returns:
A string containing the OpenScop dump of the clay structure.

Definition at line 142 of file clay.c.

References OSL_malloc, OSL_MAX_STRING, OSL_realloc, osl_util_safe_strcat(), and osl_clay::script.

Referenced by osl_clay_interface().

osl_clay_p osl_clay_sread ( char **  input)

osl_clay_sread function: this function reads a clay structure from a string complying to the OpenScop textual format and returns a pointer to this clay structure. The input parameter is updated to the position in the input string this function reach right after reading the clay structure.

Parameters:
[in,out]inputThe input string where to find a clay. Updated to the position after what has been read.
Returns:
A pointer to the clay structure that has been read.

Definition at line 178 of file clay.c.

References osl_clay_malloc(), OSL_debug, OSL_error, OSL_MAX_STRING, OSL_strdup, and osl_clay::script.

Referenced by osl_clay_interface().