|
|
| version 1.2, 2001/09/26 15:43:59 | version 1.27, 2009/06/14 00:33:36 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: @b dnode methods class - MDnode class decl. | Parser: @b dnode methods class - MDnode class decl. |
| Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| */ | |
| $Id$ | |
| */ | #ifndef XNODE_H |
| #define XNODE_H | |
| #ifndef XNODE_H | |
| #define XNODE_H | static const char * const IDENT_XNODE_H="$Date$"; |
| #include <util/XMLString.hpp> | class MXnode: public Methoded { |
| public: // Value | |
| class MXnode : public Methoded { | |
| public: // Value | /// MXnode: +$const |
| Value* get_element(const String& aname, Value& aself, bool looking_up) { | |
| /// MXnode: +$const | // $method |
| Value *get_element(const String& aname) { | if(Value* result=Methoded::get_element(aname, aself, looking_up)) |
| // $CLASS, $method | return result; |
| if(Value *result=Methoded::get_element(aname)) | |
| return result; | // $const |
| if(Value* result=consts.get(aname)) | |
| // $const | return result; |
| if(Value *result=(Value *)consts.get(aname)) | |
| return result; | return 0; |
| } | |
| return 0; | |
| } | |
| public: // VStateless_class | |
| Value* create_new_value(Pool&, HashStringValue*) { | |
| public: // VStateless_class | throw Exception(PARSER_RUNTIME, |
| Value *create_new_value(Pool& pool) { return new(pool) VXnode(pool); } | 0, |
| "no constructors available, use CreateXXX DOM methods to create nodes instead"); | |
| public: | } |
| MXnode(Pool& pool); | |
| public: | |
| public: // Methoded | MXnode(const char* aname=0, VStateless_class* abase=0); |
| bool used_directly() { return true; } | |
| public: // Methoded | |
| private: | bool used_directly() { return true; } |
| Hash consts; | private: |
| }; | |
| HashStringValue consts; | |
| #endif | }; |
| xmlNode& as_node(MethodParams& params, int index, const char* msg); | |
| xmlChar* as_xmlchar(Request& r, MethodParams& params, int index, const char* msg); | |
| xmlNs& pa_xmlMapNs(xmlDoc& doc, const xmlChar* href, const xmlChar* prefix); | |
| #endif |