Annotation of parser3/src/classes/xnode.h, revision 1.28

1.28    ! misha       1: /** @file
        !             2:        Parser: @b dnode methods class - MDnode class decl.
        !             3: 
        !             4:        Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com)
        !             5:        Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
        !             6: */
        !             7: 
        !             8: #ifndef XNODE_H
        !             9: #define XNODE_H
        !            10: 
        !            11: static const char * const IDENT_XNODE_H="$Date: 2009-06-14 00:33:36 $";
        !            12: 
        !            13: class MXnode: public Methoded {
        !            14: public: // Value
        !            15: 
        !            16:        /// MXnode: +$const
        !            17:        Value* get_element(const String& aname, Value& aself, bool looking_up) {
        !            18:                // $method
        !            19:                if(Value* result=Methoded::get_element(aname, aself, looking_up))
        !            20:                        return result;
        !            21: 
        !            22:                // $const
        !            23:                if(Value* result=consts.get(aname))
        !            24:                        return result;
        !            25:                
        !            26:                return 0;
        !            27:        }
        !            28: 
        !            29: 
        !            30: public: // VStateless_class
        !            31:        Value* create_new_value(Pool&, HashStringValue*) { 
        !            32:                throw Exception(PARSER_RUNTIME,
        !            33:                        0,
        !            34:                        "no constructors available, use CreateXXX DOM methods to create nodes instead"); 
        !            35:        }
        !            36: 
        !            37: public:
        !            38:        MXnode(const char* aname=0, VStateless_class* abase=0);
        !            39: 
        !            40: public: // Methoded
        !            41:        bool used_directly() { return true; }
        !            42: 
        !            43: private:
        !            44: 
        !            45:        HashStringValue consts;
        !            46: };
        !            47: 
        !            48: xmlNode& as_node(MethodParams& params, int index, const char* msg);
        !            49: xmlChar* as_xmlchar(Request& r, MethodParams& params, int index, const char* msg);
        !            50: xmlNs& pa_xmlMapNs(xmlDoc& doc, const xmlChar* href, const xmlChar* prefix);
        !            51: 
        !            52: #endif

E-mail: