ffead.server.doc
FFEADContext.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  * FFEADContext.h
18  *
19  * Created on: Oct 17, 2010
20  * Author: root
21  */
22 
23 #ifndef FFEADCONTEXT_H_
24 #define FFEADCONTEXT_H_
25 #include "XmlParser.h"
26 #include "Reflector.h"
27 #include "CastUtil.h"
28 #include "AfcUtil.h"
29 
30 class Bean
31 {
32  friend class FFEADContext;
33  string name,inbuilt,value,clas,bean,intfType,injectAs;
34  bool realbean;
35  vector<string> injs,names,types;
36 };
37 typedef map<string,Bean> beanMap;
38 class FFEADContext {
39  beanMap beans,injbns;
40  map<string,void*> objects;
41  bool cleared;
42 public:
43  FFEADContext(string);
44  virtual ~FFEADContext();
45  void* getBean(string);
46  void* getBean(Bean);
47  void clear();
48 };
49 
50 #endif /* FFEADCONTEXT_H_ */