Annotation of parser3/src/classes/xnode.h, revision 1.33
1.28 misha 1: /** @file
2: Parser: @b dnode methods class - MDnode class decl.
3:
1.32 moko 4: Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com)
1.28 misha 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
6: */
7:
8: #ifndef XNODE_H
9: #define XNODE_H
10:
1.33 ! moko 11: #define IDENT_XNODE_H "$Id: xnode.h,v 1.32 2015/10/26 01:21:55 moko Exp $"
1.28 misha 12:
13: class MXnode: public Methoded {
14: public: // Value
15:
16: /// MXnode: +$const
1.29 misha 17: Value* get_element(const String& aname) {
1.28 misha 18: // $method
1.29 misha 19: if(Value* result=Methoded::get_element(aname))
1.28 misha 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
1.29 misha 31: Value* create_new_value(Pool&) {
1.28 misha 32: throw Exception(PARSER_RUNTIME,
33: 0,
34: "no constructors available, use CreateXXX DOM methods to create nodes instead");
35: }
36:
37: public:
1.33 ! moko 38: MXnode(const char* aname=0);
1.28 misha 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);
1.30 misha 50: xmlChar* as_xmlqname(Request& r, MethodParams& params, int index, const char* msg=0);
51: xmlChar* as_xmlncname(Request& r, MethodParams& params, int index, const char* msg=0);
52: xmlChar* as_xmlname(Request& r, MethodParams& params, int index, const char* msg=0);
53: xmlChar* as_xmlnsuri(Request& r, MethodParams& params, int index);
1.28 misha 54: xmlNs& pa_xmlMapNs(xmlDoc& doc, const xmlChar* href, const xmlChar* prefix);
55:
56: #endif
E-mail: