Annotation of parser3/src/types/pa_vstatus.h, revision 1.2
1.1 paf 1: /** @file
2: Parser: @b status class decl.
3:
4: Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
5: Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
6:
1.2 ! paf 7: $Id: pa_vstatus.h,v 1.1 2001/11/05 10:21:28 paf Exp $
1.1 paf 8: */
9:
10: #ifndef PA_VSTATUS_H
11: #define PA_VSTATUS_H
12:
13: #include "pa_status_provider.h"
14:
15: #define STATUS_CLASS_NAME "status"
16:
17: /// status class
18: class VStatus : public Value {
19: public: // Value
20:
21: const char *type() const { return "status"; }
22:
23: // VStatus: field
24: Value *get_element(const String& aname) {
25: // getstatus
1.2 ! paf 26: if(Status_provider *provider=static_cast<Status_provider *>(status_providers->get(aname)))
! 27: return &provider->get_status(pool(), &aname);
! 28:
! 29: return 0;
1.1 paf 30: }
31:
32: public: // usage
33:
34: VStatus(Pool& apool) : Value(apool) {
35: }
36:
37: };
38:
39: #endif
E-mail: