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

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: 
1.17    ! paf         7:        $Id: pa_vstateless_object.h,v 1.16 2002/04/18 14:35:13 paf Exp $
1.1       paf         8: */
                      9: 
                     10: #ifndef PA_VSTATELESS_OBJECT_H
                     11: #define PA_VSTATELESS_OBJECT_H
                     12: 
                     13: #include "pa_valiased.h"
                     14: #include "pa_vjunction.h"
1.13      paf        15: #include "pa_vstateless_class.h"
1.1       paf        16: 
1.6       paf        17: /**    the object of some class. 
1.5       paf        18:        
1.6       paf        19:        "of some class" means "with some set of methods".
1.5       paf        20: */
1.1       paf        21: class VStateless_object : public VAliased {
                     22: public: // Value
                     23:        
1.7       paf        24:        /// VStateless_object: +$method
1.1       paf        25:        Value *get_element(const String& name) {
1.10      parser     26:                // $CLASS
1.7       paf        27:                if(Value *result=VAliased::get_element(name))
                     28:                        return result;
1.9       paf        29: 
1.1       paf        30:                // $method=junction(self+class+method)
1.17    ! paf        31:                if(Junction *junction=get_class()->get_junction(*this, name))
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.17    ! paf        39:        VStateless_object(Pool& apool) : VAliased(apool) {}
1.1       paf        40: 
                     41: };
                     42: 
                     43: #endif

E-mail: