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

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

E-mail: