Annotation of parser3/src/types/pa_vstateless_object.h, revision 1.20

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.20    ! paf        11: static const char* IDENT_VSTATELESS_OBJECT_H="$Date: 2002/08/01 11:41:25 $";
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.7       paf        23:        /// VStateless_object: +$method
1.1       paf        24:        Value *get_element(const String& name) {
                     25:                // $method=junction(self+class+method)
1.17      paf        26:                if(Junction *junction=get_class()->get_junction(*this, name))
1.3       paf        27:                        return NEW VJunction(*junction);
1.9       paf        28: 
1.1       paf        29:                return 0;
                     30:        }
                     31: 
                     32: public: // creation
                     33: 
1.20    ! paf        34:        VStateless_object(Pool& apool) : Value(apool) {}
1.1       paf        35: 
                     36: };
                     37: 
                     38: #endif

E-mail: