summaryrefslogtreecommitdiff
path: root/comm/OLD/ReqMgr.h
diff options
context:
space:
mode:
authorchatty1993-04-07 11:50:31 +0000
committerchatty1993-04-07 11:50:31 +0000
commitba066c34dde204aa192d03a23a81356374d93731 (patch)
tree39391f6235d2cf8a59a0634ac5ea430cdd21f5d4 /comm/OLD/ReqMgr.h
parent05ab076e1c2a9ca16472f9a6b47b8d22914b3783 (diff)
downloadivy-league-ba066c34dde204aa192d03a23a81356374d93731.zip
ivy-league-ba066c34dde204aa192d03a23a81356374d93731.tar.gz
ivy-league-ba066c34dde204aa192d03a23a81356374d93731.tar.bz2
ivy-league-ba066c34dde204aa192d03a23a81356374d93731.tar.xz
Initial revision
Diffstat (limited to 'comm/OLD/ReqMgr.h')
-rw-r--r--comm/OLD/ReqMgr.h81
1 files changed, 81 insertions, 0 deletions
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 <RequestField> Params;
+public:
+inline void AddParameter (RequestField& f) { Params.Append (&f); }
+inline const CcuListOf <RequestField>& GetParameters () const { return Params; }
+};
+
+class RequestType {
+friend int yyparse ();
+protected:
+ CcuString Name;
+ CcuListOf <RequestField> Fields;
+ CcuListOf <RequestField> Getters;
+ CcuListOf <RequestField> Setters;
+ CcuListOf <RequestConstructor> 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 <RequestType> 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_ */