Annotation of parser3/src/types/pa_vxnode.h, revision 1.1
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:
! 7: $Id: pa_vdnode.h,v 1.3 2001/09/26 10:32:26 parser Exp $
! 8: */
! 9:
! 10: #ifndef PA_VXNODE_H
! 11: #define PA_VXNODE_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 *Xnode_class;
! 21:
! 22: //void VXnode_cleanup(void *);
! 23:
! 24: /// value of type 'dnode'. implemented with XalanNode
! 25: class VXnode : public VStateless_object {
! 26: //friend void VXnode_cleanup(void *);
! 27: public: // Value
! 28:
! 29: const char *type() const { return "xnode"; }
! 30:
! 31: /// VXnode: $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: VXnode(Pool& apool, XalanNode *anode=0, VStateless_class& abase=*Xnode_class) :
! 42: VStateless_object(apool, abase),
! 43: fnode(anode) {
! 44: //register_cleanup(VXnode_cleanup, this);
! 45: }
! 46: private:
! 47: //void cleanup() {}
! 48: public:
! 49:
! 50: void set_node(XalanNode& anode) { fnode=&anode; }
! 51:
! 52: public: // VXnode
! 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: