ffead.server.doc
ClassInfo.h
1 /*
2  Copyright 2009-2012, Sumeet Chhetri
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16 /*
17  * ClassInfo.h
18  *
19  * Created on: Aug 21, 2009
20  * Author: sumeet
21  */
22 
23 #ifndef CLASSINFO_H_
24 #define CLASSINFO_H_
25 #include "string"
26 #include <iostream>
27 #include <typeinfo>
28 #include "Constructor.h"
29 #include "Method.h"
30 #include "Field.h"
31 #include "vector"
32 #include "map"
33 #include "StringUtil.h"
34 using namespace std;
35 typedef map<string,Constructor> ctorMap;
36 typedef map<string,Method> methMap;
37 typedef map<string,Field> fldMap;
38 typedef vector<Field> fldVec;
39 typedef vector<string> args;
40 class ClassInfo {
41 public:
42  ClassInfo();
43  virtual ~ClassInfo();
44  //void *getInstance() const;
45  //void setInstance(void *);
46  string getClassName() const;
47  void setClassName(string);
48  string getBase() const;
49  void setBase(string);
50  /*string getPublic_fields() const;
51  void setPublic_fields(string);
52  string getPrivate_fields() const;
53  void setPrivate_fields(string);
54  string getProtected_fields() const;
55  void setProtected_fields(string);
56  string getPublic_meths() const;
57  void setPublic_meths(string);
58  string getPrivate_meths() const;
59  void setPrivate_meths(string);
60  string getProtected_meths() const;
61  void setProtected_meths(string);
62  vector<Method> getMethods() const;
63  void setMethods(vector<Method>);
64  vector<Field> getFields() const;
65  void setFields(vector<Field>);
66  void setMeths(methMap);*/
67  Constructor getConstructor(args);
68  void addConstructor(Constructor);
69  ctorMap getConstructors();
70  Method getMethod(string,args);
71  void addMethod(Method);
72  methMap getMethods();
73  Field getField(string);
74  void addField(Field);
75  fldMap getFields();
76  fldVec getFieldVec();
77 private:
78  void* instance;
79  string className;
80  string base;
81  /*string public_fields;
82  string private_fields;
83  string protected_fields;
84  string public_meths;
85  string private_meths;
86  string protected_meths;
87  vector<Method> methods;
88  vector<Field> fields;*/
89  ctorMap ctors;
90  methMap meths;
91  fldMap fields;
92  fldVec fldvec;
93 };
94 
95 #endif /* CLASSINFO_H_ */