TemplateInclude.h File Reference

Templates for include files of objects. More...

`#include <stdlib.h>`
`#include "ixml.h"`
`#include "list.h"`
`#include "UpnpGlobal.h"`
`#include "UpnpString.h"`
`#include "TemplateUndef.h"`
Include dependency graph for TemplateInclude.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros

#define | TEMPLATE_PROTOTYPE_COMMON(CLASS) TEMPLATE_PROTOTYPE_COMMON_AUX(CLASS)
#define | TEMPLATE_PROTOTYPE_COMMON_AUX(CLASS)
#define | TEMPLATE_PROTOTYPE_INT(CLASS, MEMBER, TYPE) TEMPLATE_PROTOTYPE_INT_AUX(CLASS, MEMBER, TYPE)
#define | TEMPLATE_PROTOTYPE_INT_AUX(CLASS, MEMBER, TYPE)
#define | TEMPLATE_PROTOTYPE_BUFFER(CLASS, MEMBER, TYPE) TEMPLATE_PROTOTYPE_BUFFER_AUX(CLASS, MEMBER, TYPE)
#define | TEMPLATE_PROTOTYPE_BUFFER_AUX(CLASS, MEMBER, TYPE)
#define | TEMPLATE_PROTOTYPE_LIST(CLASS, MEMBER) TEMPLATE_PROTOTYPE_LIST_AUX(CLASS, MEMBER)
#define | TEMPLATE_PROTOTYPE_LIST_AUX(CLASS, MEMBER)
#define | TEMPLATE_PROTOTYPE_OBJECT(CLASS, MEMBER, TYPE) TEMPLATE_PROTOTYPE_OBJECT_AUX(CLASS, MEMBER, TYPE)
#define | TEMPLATE_PROTOTYPE_OBJECT_AUX(CLASS, MEMBER, TYPE)
#define | TEMPLATE_PROTOTYPE_STRING(CLASS, MEMBER) TEMPLATE_PROTOTYPE_STRING_AUX(CLASS, MEMBER)
#define | TEMPLATE_PROTOTYPE_STRING_AUX(CLASS, MEMBER)
#define | TEMPLATE_PROTOTYPE_DOMSTRING(CLASS, MEMBER) TEMPLATE_PROTOTYPE_DOMSTRING_AUX(CLASS, MEMBER)
#define | TEMPLATE_PROTOTYPE_DOMSTRING_AUX(CLASS, MEMBER)
#define | EXPAND_CLASS_MEMBER_INT(CLASS, MEMBER, TYPE) TEMPLATE_PROTOTYPE_INT(CLASS, MEMBER, TYPE)
#define | EXPAND_CLASS_MEMBER_BUFFER(CLASS, MEMBER, TYPE) TEMPLATE_PROTOTYPE_BUFFER(CLASS, MEMBER, TYPE)
#define | EXPAND_CLASS_MEMBER_LIST(CLASS, MEMBER) TEMPLATE_PROTOTYPE_LIST(CLASS, MEMBER)
#define | EXPAND_CLASS_MEMBER_OBJECT(CLASS, MEMBER, TYPE) TEMPLATE_PROTOTYPE_OBJECT(CLASS, MEMBER, TYPE)
#define | EXPAND_CLASS_MEMBER_STRING(CLASS, MEMBER) TEMPLATE_PROTOTYPE_STRING(CLASS, MEMBER)
#define | EXPAND_CLASS_MEMBER_DOMSTRING(CLASS, MEMBER) TEMPLATE_PROTOTYPE_DOMSTRING(CLASS, MEMBER)

## Typedefs

typedef struct s_CLASS | CLASS

## Functions

CLASS * | CLASS_new ()
void | CLASS_delete (CLASS *p)
CLASS * | CLASS_dup (const CLASS *p)
int | CLASS_assign (CLASS *p, const CLASS *q)

## Detailed Description

Templates for include files of objects.

Usage:

- In the include file Token.h: #include "Token_def.h" #include "TemplateInclude.h"
- In the source file Token.c: #include "Token.h" #include "TemplateSource.h"

Author
  Marcelo Roberto Jimenez

## Macro Definition Documentation

## TEMPLATE_PROTOTYPE_BUFFER_AUX

#define TEMPLATE_PROTOTYPE_BUFFER_AUX | ( |  | CLASS,
|  |  | MEMBER,
|  |  | TYPE
| ) |  |

Value:
\
EXPORT_SPEC const TYPE *CLASS##_get_##MEMBER(const CLASS *p); \
EXPORT_SPEC int CLASS##_set_##MEMBER(CLASS *p, const TYPE *buf); \
EXPORT_SPEC void CLASS##_clear_##MEMBER(CLASS *p); \
CLASS
struct s_CLASS CLASS
Definition: TemplateInclude.h:138

## TEMPLATE_PROTOTYPE_COMMON_AUX

#define TEMPLATE_PROTOTYPE_COMMON_AUX | ( |  | CLASS | ) |

Value:
\
typedef struct s_##CLASS CLASS; \
\ \
EXPORT_SPEC CLASS *CLASS##_new(); \
\ \
EXPORT_SPEC void CLASS##_delete(CLASS *p); \
\ \
EXPORT_SPEC CLASS *CLASS##_dup(const CLASS *p); \
\ \
EXPORT_SPEC int CLASS##_assign(CLASS *p, const CLASS *q); \
CLASS
struct s_CLASS CLASS
Definition: TemplateInclude.h:138

## TEMPLATE_PROTOTYPE_DOMSTRING_AUX

#define TEMPLATE_PROTOTYPE_DOMSTRING_AUX | ( |  | CLASS,
|  |  | MEMBER
| ) |  |

Value:
\
EXPORT_SPEC const DOMString CLASS##_get_##MEMBER(const CLASS *p); \
EXPORT_SPEC int CLASS##_set_##MEMBER(CLASS *p, const DOMString s); \
EXPORT_SPEC const char *CLASS##_get_##MEMBER##_cstr(const CLASS *p); \
CLASS
struct s_CLASS CLASS
Definition: TemplateInclude.h:138
DOMString
#define DOMString
The type of DOM strings.
Definition: ixml.h:59

## TEMPLATE_PROTOTYPE_INT_AUX

#define TEMPLATE_PROTOTYPE_INT_AUX | ( |  | CLASS,
|  |  | MEMBER,
|  |  | TYPE
| ) |  |

Value:
\
EXPORT_SPEC TYPE CLASS##_get_##MEMBER(const CLASS *p); \
EXPORT_SPEC int CLASS##_set_##MEMBER(CLASS *p, TYPE n); \
CLASS
struct s_CLASS CLASS
Definition: TemplateInclude.h:138

## TEMPLATE_PROTOTYPE_LIST_AUX

#define TEMPLATE_PROTOTYPE_LIST_AUX | ( |  | CLASS,
|  |  | MEMBER
| ) |  |

Value:
\
EXPORT_SPEC const struct list_head *CLASS##_get_##MEMBER(const CLASS *p); \
EXPORT_SPEC void CLASS##_add_to_list_##MEMBER(CLASS *p, struct list_head *head); \
EXPORT_SPEC void CLASS##_remove_from_list_##MEMBER(CLASS *p); \
EXPORT_SPEC void CLASS##_replace_in_list_##MEMBER(CLASS *p, struct list_head *new); \
CLASS
struct s_CLASS CLASS
Definition: TemplateInclude.h:138
list_head
Definition: list.h:58

## TEMPLATE_PROTOTYPE_OBJECT_AUX

#define TEMPLATE_PROTOTYPE_OBJECT_AUX | ( |  | CLASS,
|  |  | MEMBER,
|  |  | TYPE
| ) |  |

Value:
\
EXPORT_SPEC const TYPE *CLASS##_get_##MEMBER(const CLASS *p); \
EXPORT_SPEC int CLASS##_set_##MEMBER(CLASS *p, const TYPE *n); \
CLASS
struct s_CLASS CLASS
Definition: TemplateInclude.h:138

## TEMPLATE_PROTOTYPE_STRING_AUX

#define TEMPLATE_PROTOTYPE_STRING_AUX | ( |  | CLASS,
|  |  | MEMBER
| ) |  |

Value:
\
EXPORT_SPEC const UpnpString *CLASS##_get_##MEMBER(const CLASS *p); \
EXPORT_SPEC int CLASS##_set_##MEMBER(CLASS *p, const UpnpString *s); \
EXPORT_SPEC size_t CLASS##_get_##MEMBER##_Length(const CLASS *p); \
EXPORT_SPEC const char *CLASS##_get_##MEMBER##_cstr(const CLASS *p); \
EXPORT_SPEC int CLASS##_strcpy_##MEMBER(CLASS *p, const char *s); \
EXPORT_SPEC int CLASS##_strncpy_##MEMBER(CLASS *p, const char *s, size_t n); \
EXPORT_SPEC void CLASS##_clear_##MEMBER(CLASS *p); \
CLASS
struct s_CLASS CLASS
Definition: TemplateInclude.h:138
UpnpString
struct s_UpnpString UpnpString
Type of the string objects inside libupnp.
Definition: UpnpString.h:38

## Typedef Documentation

## CLASS

typedef struct s_CLASS CLASS

- DOC_CLASS

## Function Documentation

## CLASS_assign()

int CLASS_assign | ( | CLASS * | p,
|  | const CLASS * | q
| ) |  |

Assignment operator

## CLASS_delete()

void CLASS_delete | ( | CLASS * | p | ) |

Destructor

## CLASS_dup()

CLASS* CLASS_dup | ( | const CLASS * | p | ) |

Copy Constructor

## CLASS_new()

CLASS* CLASS_new | ( |  | ) |

Constructor