From ba066c34dde204aa192d03a23a81356374d93731 Mon Sep 17 00:00:00 2001 From: chatty Date: Wed, 7 Apr 1993 11:50:31 +0000 Subject: Initial revision --- comm/OLD/ReqMgr.h | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 comm/OLD/ReqMgr.h (limited to 'comm/OLD/ReqMgr.h') diff --git a/comm/OLD/ReqMgr.h b/comm/OLD/ReqMgr.h new file mode 100644 index 0000000..1b02196 --- /dev/null +++ b/comm/OLD/ReqMgr.h @@ -0,0 +1,81 @@ +/* + * The Unix Channel + * + * by Michel Beaudouin-Lafon + * + * Copyright 1993 + * Centre d'Etudes de la Navigation Aerienne (CENA) + * + * Request management, by Stephane Chatty + * + * $Id$ + * $CurLog$ + */ + +#ifndef ReqMgr_H_ +#define ReqMgr_H_ + +#include "ccu/String.h" +#include "ccu/List.h" +class ofstream; + +class RequestField { +protected: + CcuString Name; + CcuString Type; + CcuString Impl; +public: +inline RequestField (const char* n, const char* t, const char* i) : Name (n), Type (t), Impl (i) {} +inline const char* GetName () const { return Name; } +inline const char* GetType () const { return Type; } +inline const char* GetImpl () const { return Impl; } +}; + +class RequestConstructor { +friend int yyparse (); +protected: + CcuListOf Params; +public: +inline void AddParameter (RequestField& f) { Params.Append (&f); } +inline const CcuListOf & GetParameters () const { return Params; } +}; + +class RequestType { +friend int yyparse (); +protected: + CcuString Name; + CcuListOf Fields; + CcuListOf Getters; + CcuListOf Setters; + CcuListOf Constructors; + +public: +inline RequestType (const char* n) : Name (n) { } +inline void AddField (RequestField* f) { Fields.Append (f); } +inline void AddConstructor (RequestConstructor* f) { Constructors.Append (f); } +inline const char* GetName () const { return Name; } + void Dump (ofstream&); + void DumpHeader (ofstream&); + void DumpSource (ofstream&); +}; + + +class UchReqMgr { +friend int yyparse (); + +protected: + CcuString Name; + CcuListOf Requests; + void SetName (const char*); +inline void Add (RequestType* t) { Requests.Append (t); } + +public: + UchReqMgr (); + ~UchReqMgr (); + void Read (const char*); + void Dump (const char*); + void DumpHeader (const char*); + void DumpSource (const char*); +}; + +#endif /* ReqMgr_H_ */ -- cgit v1.1