• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * smart_analyzer_loader.h - smart analyzer loader
3  *
4  *  Copyright (c) 2015 Intel Corporation
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * Author: Zong Wei <wei.zong@intel.com>
19  */
20 
21 #ifndef XCAM_SMART_ANALYZER_LOADER_H
22 #define XCAM_SMART_ANALYZER_LOADER_H
23 
24 #include <xcam_std.h>
25 #include <analyzer_loader.h>
26 #include <smart_analysis_handler.h>
27 #include <base/xcam_smart_description.h>
28 #include <list>
29 
30 namespace XCam {
31 
32 class SmartAnalyzer;
33 class SmartAnalysisHandler;
34 class SmartAnalyzerLoader;
35 
36 typedef std::list<SmartPtr<SmartAnalyzerLoader>> AnalyzerLoaderList;
37 
38 class SmartAnalyzerLoader
39     : public AnalyzerLoader
40 {
41 
42 public:
43     SmartAnalyzerLoader (const char *lib_path, const char *name = NULL, const char *symbol = XCAM_SMART_ANALYSIS_LIB_DESCRIPTION);
44     virtual ~SmartAnalyzerLoader ();
45 
46     static SmartHandlerList load_smart_handlers (const char *dir_path);
47 
48 protected:
49     static AnalyzerLoaderList create_analyzer_loader (const char *dir_path);
50     SmartPtr<SmartAnalysisHandler> load_smart_handler (SmartPtr<SmartAnalyzerLoader> &self);
51 
52 protected:
53     virtual void *load_symbol (void* handle);
54 
55 private:
56     XCAM_DEAD_COPY (SmartAnalyzerLoader);
57 
58 private:
59     char *_name;
60 };
61 
62 };
63 #endif //XCAM_SMART_ANALYZER_LOADER_H
64