Annotation of parser3/src/types/pa_vdnode.h, revision 1.3
1.1 parser 1: /** @file
2: Parser: @b DOM parser class decl.
3:
4: Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
5: Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
6:
1.3 ! parser 7: $Id: pa_vdnode.h,v 1.2 2001/09/20 14:25:06 parser Exp $
1.1 parser 8: */
9:
10: #ifndef PA_VDNODE_H
11: #define PA_VDNODE_H
12:
13: #include "classes.h"
14: #include "pa_common.h"
15: #include "pa_vstateless_object.h"
16:
17: #include <XalanDOM/XalanNode.hpp>
18: #include <PlatformSupport/XSLException.hpp>
19:
20: extern Methoded *Dnode_class;
21:
22: //void VDnode_cleanup(void *);
23:
24: /// value of type 'dnode'. implemented with XalanNode
25: class VDnode : public VStateless_object {
26: //friend void VDnode_cleanup(void *);
27: public: // Value
28:
29: const char *type() const { return "dnode"; }
30:
31: /// VDnode: $CLASS,$method, fields
32: Value *get_element(const String& aname);
33:
34: protected: // VAliased
35:
36: /// disable .CLASS element. @see VAliased::get_element
37: bool hide_class() { return true; }
38:
39: public: // usage
40:
41: VDnode(Pool& apool, XalanNode *anode=0, VStateless_class& abase=*Dnode_class) :
42: VStateless_object(apool, abase),
43: fnode(anode) {
44: //register_cleanup(VDnode_cleanup, this);
45: }
46: private:
47: //void cleanup() {}
48: public:
49:
50: void set_node(XalanNode& anode) { fnode=&anode; }
51:
52: public: // VDnode
53: virtual XalanNode &get_node(Pool& pool, const String *source) {
54: if(!fnode)
55: PTHROW(0, 0,
56: source,
57: "can not be applied to uninitialized instance");
58: return *fnode;
59: }
60:
61: private:
62:
63: XalanNode *fnode;
64:
65: };
66:
67: #endif
E-mail: