Annotation of parser3/src/classes/xnode.h, revision 1.26
1.1 parser 1: /** @file
2: Parser: @b dnode methods class - MDnode class decl.
3:
1.24 paf 4: Copyright (c) 2001-2005 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.26 ! misha 11: static const char * const IDENT_XNODE_H="$Date: 2005/12/16 10:15:12 $";
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.23 paf 31: Value* create_new_value(Pool&, HashStringValue&) {
1.26 ! misha 32: throw Exception(PARSER_RUNTIME,
1.22 paf 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.25 paf 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);
1.1 parser 51:
52: #endif
E-mail: