Annotation of parser3/src/types/pa_vstateless_object.h, revision 1.21
1.5 paf 1: /** @file
1.8 paf 2: Parser: @b stateless_object class decl.
1.5 paf 3:
1.14 paf 4: Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com)
1.15 paf 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.1 paf 6: */
7:
8: #ifndef PA_VSTATELESS_OBJECT_H
9: #define PA_VSTATELESS_OBJECT_H
1.18 paf 10:
1.21 ! paf 11: static const char* IDENT_VSTATELESS_OBJECT_H="$Date: 2002/08/12 10:32:54 $";
1.1 paf 12:
13: #include "pa_vjunction.h"
1.13 paf 14: #include "pa_vstateless_class.h"
1.1 paf 15:
1.6 paf 16: /** the object of some class.
1.5 paf 17:
1.6 paf 18: "of some class" means "with some set of methods".
1.5 paf 19: */
1.20 paf 20: class VStateless_object : public Value {
1.1 paf 21: public: // Value
22:
1.21 ! paf 23: /// VStateless_object: class.get_junction
! 24: /*override*/ Junction *get_junction(const String& name, bool looking_down) {
! 25: return get_class()->get_junction(name, looking_down);
! 26: }
! 27:
1.7 paf 28: /// VStateless_object: +$method
1.1 paf 29: Value *get_element(const String& name) {
30: // $method=junction(self+class+method)
1.21 ! paf 31: if(Junction *junction=get_junction(name, false))
1.3 paf 32: return NEW VJunction(*junction);
1.9 paf 33:
1.1 paf 34: return 0;
35: }
36:
37: public: // creation
38:
1.20 paf 39: VStateless_object(Pool& apool) : Value(apool) {}
1.1 paf 40:
41: };
42:
43: #endif
E-mail: