pano_interfaces.h
Go to the documentation of this file.
00001 #ifndef PANO_INTERFACES_H_H
00002 #define PANO_INTERFACES_H_H
00003 
00004 #include <opencv2/core/core.hpp>
00005 
00006 namespace pano{
00007 
00008 class drawable{
00009 public:
00010   virtual ~drawable(){}
00016   virtual void draw(cv::Mat* out, int flags = 0) = 0;
00017 };
00018 
00019 class serializable{
00020 public:
00021   virtual ~serializable(){}
00022   virtual int version() const = 0;
00023   virtual void serialize(cv::FileStorage& fs) const = 0;
00024   virtual void deserialize(const cv::FileNode& fn) = 0;
00025 };
00026 
00027 template <typename Base>
00028 class Copier{
00029 public:
00030   virtual ~Copier(){}
00031   virtual Base* make() const = 0;
00032   virtual Base* clone(const Base& n) const = 0;
00033 };
00034 
00035 template <typename Sub, typename Base>
00036 class SCopier:public Copier<Base> {
00037 public:
00038   virtual ~SCopier(){}
00039   virtual Base* make() const{
00040     return new Sub();
00041   }
00042   virtual Base* clone(const Base& sub) const{
00043     return new Sub(dynamic_cast<const Sub&>(sub));
00044   }
00045 };
00046 
00047 
00048 }
00049 #endif


pano_core
Author(s): Ethan Rublee
autogenerated on Wed Aug 26 2015 16:34:01