[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

hugin_base/panodata/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 #include <set>
00029 #include "Panorama.h"
00030 
00031 namespace HuginBase {
00032 
00057 class IMPEX ConstImageVariableGroup
00058 {
00059 public:
00060     enum ImageVariableEnum {
00061 #define image_variable( name, type, default_value ) \
00062 IVE_##name, 
00063 #include "image_variables.h"
00064 #undef image_variable
00065     };
00071     ConstImageVariableGroup(std::set<ImageVariableEnum> variables,
00072                             const PanoramaData & pano);
00073     
00075     virtual ~ConstImageVariableGroup();
00076     
00083     unsigned int getPartNumber(unsigned int imageNr) const;
00084     
00089     std::size_t getNumberOfParts();
00090     
00099     bool getVarLinkedInPart(ImageVariableEnum variable, std::size_t part) const;
00100     
00103     void updatePartNumbers();
00104 protected:
00105     // Member variables
00107     std::set<ImageVariableEnum> m_variables;
00108     
00110     const PanoramaData & m_pano;
00111     
00115     std::vector<unsigned int> m_image_part_numbers;
00116     
00117     unsigned int m_num_parts;
00118     
00119     // Member functions
00126     void setPartNumbers();
00127     
00128 };
00129 
00135 class IMPEX ImageVariableGroup: public ConstImageVariableGroup
00136 {
00137 public:
00143     ImageVariableGroup(std::set<ImageVariableEnum> variables,
00144                        PanoramaData & pano)
00145             : ConstImageVariableGroup(variables, pano),
00146                 m_pano (pano)
00147     {
00148     }
00149     
00157     void unlinkVariablePart(ImageVariableEnum variable, unsigned int partNr);
00158     
00160     void unlinkVariableImage(ImageVariableEnum variable, unsigned int imageNr);
00161     
00163     void linkVariablePart(ImageVariableEnum variable, unsigned int partNr);
00164     
00166     void linkVariableImage(ImageVariableEnum variable, unsigned int imageNr);
00167     
00180     void switchParts (unsigned int ImageNr, unsigned int partNr);
00181 private:
00182     PanoramaData & m_pano;
00183 };
00184 
00185 } // HuginBase namespace
00186 
00187 #endif

Generated on Mon Sep 20 01:01:27 2010 for Hugintrunk by doxygen 1.3.9.1