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

sobjxc_c.c File Reference


Detailed Description

C output of the sobjxc tool.

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <time.h>
#include <limits.h>
#include <assert.h>
#include <sobject/sobject.h>
#include "sobjxc.h"

Include dependency graph for sobjxc_c.c:

Include dependency graph

Data Structures

struct  sobjxc_c_type
 Structure representing a parameter type supported by the C backend. More...

Functions

int sobjxc_c_write_doxygen_comment (const char *, const char *, FILE *, const char *, bool, bool)
 Write a Doxygen comment.
int sobjxc_c_write_param_decl (const struct sobjxc_param *, FILE *, const char *)
 Write a parameter declaration list (without the enclosing parens).
const struct sobjxc_c_typesobjxc_c_get_type (const char *)
 Get the type information for a type name.
int sobjxc_c_new_type (struct sobj *def, const char *filename, int lineno)
 Add a user defined custom type to the C backend.

Variables

sobjxc_c_type sobjxc_c_type_map [SOBJXC_C_MAX_TYPE]
 Table of parameter types supported by the C backend.

Function Documentation

const struct sobjxc_c_type * sobjxc_c_get_type const char *  type  )  [static]
 

Get the type information for a type name.

Parameters:
type The type name.
Returns:
The the type is supported by the C backend, then a pointer to the type information object is returned. If the type is not supported, then a null-pointer is returned.

int sobjxc_c_write_doxygen_comment const char *  doxy_comment,
const char *  standard_params,
FILE *  fp,
const char *  filename,
bool  param_uppercase,
bool  close_comment
[static]
 

Write a Doxygen comment.

Parameters:
doxy_comment The Doxygen comment.
standard_params The standard parameters to be added to the parameter documentation. This may be a null-pointer.
fp The output file stream.
filename The output file name.
param_uppercase Flag indicating that the parameter name prefix should be in uppercase characters (required when writing a Doxygen comment for a macro).
close_comment Flag indicating if the Doxygen comment should be closed.
Return values:
0 Success.
-1 An error occurred and has been logged through sobjxc_error().

int sobjxc_c_write_param_decl const struct sobjxc_param param_list,
FILE *  fp,
const char *  filename
[static]
 

Write a parameter declaration list (without the enclosing parens).

Parameters:
param_list The parameter list.
fp The output file stream.
filename The output file name.
Return values:
0 Success.
-1 An error occurred and has been logged through sobjxc_error().


Variable Documentation

struct sobjxc_c_type sobjxc_c_type_map[SOBJXC_C_MAX_TYPE] [static]
 

Initial value:

 {
  { .type = "bool",
    .ctype = "bool",
    .cvt = "sobj_BOOL(#, 0)",
  }, {
    .type = "int",
    .ctype = "intmax_t",
    .cvt = "sobj_INT_imax(#, 0)",
  }, {
    .type = "float",
    .ctype = "double",
    .cvt = "sobj_FLOAT(#, 0)",
  }, {
    .type = "double",
    .ctype = "double",
    .cvt = "sobj_FLOAT(#, 0)",
  }, {
    .type = "string",
    .ctype = "const char *",
    .cvt = "# ? sobj_STRING_raw(#, -1, 0) : sobj_NIL(0)",
  }, {
    .type = "object",
    .ctype = "struct sobj *",
    .cvt = "# ? # : sobj_NIL(0)",
  }, {
    .type = "time",
    .ctype = "time_t",
    .cvt = "sobj_INT_time_t(#)",
  },
}
Table of parameter types supported by the C backend.


Generated on Sat Jul 23 16:06:02 2005 for sobject by  doxygen 1.3.9.1