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

E-mail: