ImageVariableGroup.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00025 #ifndef IMAGE_VARIABLE_GROUP_H
00026 #define IMAGE_VARIABLE_GROUP_H
00027 
00028 // if this file is preprocessed for SWIG, we want to ignore
00029 // all the header inclusions that follow:
00030 
00031 #ifndef _HSI_IGNORE_SECTION
00032 
00033 #include <set>
00034 #include "Panorama.h"
00035 
00036 #endif // _HSI_IGNORE_SECTION
00037 
00038 namespace HuginBase {
00039 
00064 class IMPEX ConstImageVariableGroup
00065 {
00066 public:
00067     enum ImageVariableEnum {
00068 #define image_variable( name, type, default_value ) \
00069 IVE_##name, 
00070 #include "image_variables.h"
00071 #undef image_variable
00072     };
00078     ConstImageVariableGroup(std::set<ImageVariableEnum> variables,
00079                             const PanoramaData & pano);
00080     
00082     virtual ~ConstImageVariableGroup();
00083     
00090     unsigned int getPartNumber(unsigned int imageNr) const;
00091     
00096     std::size_t getNumberOfParts();
00097     
00106     bool getVarLinkedInPart(ImageVariableEnum variable, std::size_t part) const;
00107     
00110     void updatePartNumbers();
00111 protected:
00112     // Member variables
00114     std::set<ImageVariableEnum> m_variables;
00115     
00117     const PanoramaData & m_pano;
00118     
00122     std::vector<unsigned int> m_image_part_numbers;
00123     
00124     unsigned int m_num_parts;
00125     
00126     // Member functions
00133     void setPartNumbers();
00134     
00135 };
00136 
00142 class IMPEX ImageVariableGroup: public ConstImageVariableGroup
00143 {
00144 public:
00150     ImageVariableGroup(std::set<ImageVariableEnum> variables,
00151                        PanoramaData & pano)
00152             : ConstImageVariableGroup(variables, pano),
00153                 m_pano (pano)
00154     {
00155     }
00156     
00164     void unlinkVariablePart(ImageVariableEnum variable, unsigned int partNr);
00165     
00167     void unlinkVariableImage(ImageVariableEnum variable, unsigned int imageNr);
00168     
00170     void linkVariablePart(ImageVariableEnum variable, unsigned int partNr);
00171     
00173     void linkVariableImage(ImageVariableEnum variable, unsigned int imageNr);
00174     
00187     void switchParts (unsigned int ImageNr, unsigned int partNr);
00188 private:
00189     PanoramaData & m_pano;
00190 };
00191 
00192 } // HuginBase namespace
00193 
00194 #endif

Generated on 24 Oct 2014 for Hugintrunk by  doxygen 1.4.7