File: docObj.h

package info (click to toggle)
tclxml 3.1-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,080 kB
  • ctags: 876
  • sloc: ansic: 6,064; tcl: 5,116; xml: 4,642; sh: 3,112; makefile: 60
file content (54 lines) | stat: -rw-r--r-- 1,532 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* docObj.h --
 *
 *	This module manages libxml2 xmlDocPtr Tcl objects.
 *
 * Copyright (c) 2003 Zveno Pty Ltd
 * http://www.zveno.com/
 *
 * See the file "LICENSE" for information on usage and
 * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * $Id: docObj.h,v 1.3 2003/12/09 04:43:15 balls Exp $
 */

#ifndef TCLXML_LIBXML2_DOCOBJ_H
#define TCLXML_LIBXML2_DOCOBJ_H

#ifdef TCLXML_BUILD_AS_FRAMEWORK
#include <Tcl/tcl.h>
#else
#include <tcl.h>
#endif /* TCLXML_BUILD_AS_FRAMEWORK */
#include <libxml/tree.h>

typedef void (TclXML_libxml2Doc_FreeHookProc) _ANSI_ARGS_((ClientData clientData));

/*
 * Values that define how documents are handled:
 * KEEP means that documents must be explicitly destroyed,
 * IMPLICIT means that documents will be destroyed when there are no longer
 * any references to it.
 */

typedef enum TclXML_libxml2_DocumentHandling {
  TCLXML_LIBXML2_DOCUMENT_KEEP,
  TCLXML_LIBXML2_DOCUMENT_IMPLICIT
} TclXML_libxml2_DocumentHandling;

typedef struct TclXML_libxml2_Document {
  xmlDocPtr docPtr;

  char *token;			/* string rep of this document */

  TclXML_libxml2_DocumentHandling keep;
				/* how to handle document destruction */

  void *objs;			/* List of Tcl_Obj's that reference this document */

  ClientData dom;		/* Hook for TclDOM data */
  TclXML_libxml2Doc_FreeHookProc *domfree;
  ClientData apphook;		/* Application hook - not used by TclXML or TclDOM */
  TclXML_libxml2Doc_FreeHookProc *appfree;
} TclXML_libxml2_Document;

#endif /* TCLXML_LIBXML2_DOCOBJ_H */