--- parser3/src/classes/xnode.h 2002/01/28 10:33:52 1.7 +++ parser3/src/classes/xnode.h 2005/07/28 11:23:02 1.23 @@ -1,27 +1,26 @@ /** @file Parser: @b dnode methods class - MDnode class decl. - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://paf.design.ru) - - $Id: xnode.h,v 1.7 2002/01/28 10:33:52 paf Exp $ + Copyright (c) 2001-2004 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef XNODE_H #define XNODE_H +static const char * const IDENT_XNODE_H="$Date: 2005/07/28 11:23:02 $"; -class MXnode : public Methoded { +class MXnode: public Methoded { public: // Value /// MXnode: +$const - Value *get_element(const String& aname) { - // $CLASS, $method - if(Value *result=Methoded::get_element(aname)) + Value* get_element(const String& aname, Value& aself, bool looking_up) { + // $method + if(Value* result=Methoded::get_element(aname, aself, looking_up)) return result; // $const - if(Value *result=(Value *)consts.get(aname)) + if(Value* result=consts.get(aname)) return result; return 0; @@ -29,22 +28,23 @@ public: // Value public: // VStateless_class - Value *create_new_value(Pool& pool) { return new(pool) VXnode(pool, 0); } + Value* create_new_value(Pool&, HashStringValue&) { + throw Exception("parser.runtime", + 0, + "no constructors available, use CreateXXX DOM methods to create nodes instead"); + } public: - MXnode(Pool& pool); + MXnode(const char* aname=0, VStateless_class* abase=0); public: // Methoded bool used_directly() { return true; } private: - Hash consts; + HashStringValue consts; }; -#define gdome_xml_doc_get_xmlDoc(dome_doc) ((_Gdome_xml_Document *)dome_doc)->n; - -GdomeNode *as_node(Pool& pool, const String& method_name, MethodParams *params, - int index, const char *msg); +GdomeNode* as_node(MethodParams& params, int index, const char* msg); #endif