camconst.cc/h : code review
This commit is contained in:
@@ -27,9 +27,9 @@ private:
|
||||
std::string make_model;
|
||||
short dcraw_matrix[12];
|
||||
int raw_crop[4];
|
||||
int raw_mask[8][4];
|
||||
int raw_mask[2][4];
|
||||
int white_max;
|
||||
std::map<int, struct camera_const_levels> mLevels[2];
|
||||
std::map<int, camera_const_levels> mLevels[2];
|
||||
std::map<float, float> mApertureScaling;
|
||||
std::vector<int> pdafPattern;
|
||||
int pdafOffset;
|
||||
@@ -38,24 +38,23 @@ private:
|
||||
CameraConst();
|
||||
static bool parseLevels(CameraConst *cc, int bw, void *ji);
|
||||
static bool parseApertureScaling(CameraConst *cc, void *ji);
|
||||
bool get_Levels(struct camera_const_levels & lvl, int bw, int iso, float fnumber);
|
||||
bool get_Levels(camera_const_levels & lvl, int bw, int iso, float fnumber) const;
|
||||
|
||||
public:
|
||||
static CameraConst *parseEntry(void *cJSON, const char *make_model);
|
||||
bool has_dcrawMatrix(void);
|
||||
bool has_pdafPattern(void);
|
||||
bool has_dcrawMatrix(void) const;
|
||||
void update_dcrawMatrix(const short *other);
|
||||
const short *get_dcrawMatrix(void);
|
||||
std::vector<int> get_pdafPattern();
|
||||
int get_pdafOffset() {return pdafOffset;}
|
||||
bool has_rawCrop(void);
|
||||
void get_rawCrop(int& left_margin, int& top_margin, int& width, int& height);
|
||||
bool has_rawMask(int idx);
|
||||
void get_rawMask(int idx, int& top, int& left, int& bottom, int& right);
|
||||
int get_BlackLevel(int idx, int iso_speed);
|
||||
int get_WhiteLevel(int idx, int iso_speed, float fnumber);
|
||||
bool has_globalGreenEquilibration();
|
||||
bool get_globalGreenEquilibration();
|
||||
const short *get_dcrawMatrix(void) const;
|
||||
const std::vector<int>& get_pdafPattern() const;
|
||||
int get_pdafOffset() const {return pdafOffset;};
|
||||
bool has_rawCrop(void) const;
|
||||
void get_rawCrop(int& left_margin, int& top_margin, int& width, int& height) const;
|
||||
bool has_rawMask(int idx) const;
|
||||
void get_rawMask(int idx, int& top, int& left, int& bottom, int& right) const;
|
||||
int get_BlackLevel(int idx, int iso_speed) const;
|
||||
int get_WhiteLevel(int idx, int iso_speed, float fnumber) const;
|
||||
bool has_globalGreenEquilibration() const;
|
||||
bool get_globalGreenEquilibration() const;
|
||||
void update_Levels(const CameraConst *other);
|
||||
void update_Crop(CameraConst *other);
|
||||
void update_pdafPattern(const std::vector<int> &other);
|
||||
@@ -75,7 +74,7 @@ public:
|
||||
~CameraConstantsStore();
|
||||
void init(const Glib::ustring& baseDir, const Glib::ustring& userSettingsDir);
|
||||
static CameraConstantsStore *getInstance(void);
|
||||
CameraConst *get(const char make[], const char model[]);
|
||||
const CameraConst *get(const char make[], const char model[]) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user