Several files astylized.

This commit is contained in:
Hombre
2017-04-25 22:33:22 +02:00
parent fb5466bc8c
commit 8c309d0f04
9 changed files with 533 additions and 493 deletions

View File

@@ -23,15 +23,16 @@
#include <vector>
#include "../rtgui/options.h"
class DynamicProfileRule {
class DynamicProfileRule
{
public:
template <class T>
struct Range {
T min;
T max;
explicit Range(T l=T(), T u=T()): min(l), max(u) {}
explicit Range (T l = T(), T u = T()): min (l), max (u) {}
bool operator()(T val) const
bool operator() (T val) const
{
return val >= min && val <= max;
}
@@ -40,15 +41,15 @@ public:
struct Optional {
Glib::ustring value;
bool enabled;
explicit Optional(const Glib::ustring v="", bool e=false):
value(v), enabled(e) {}
explicit Optional (const Glib::ustring v = "", bool e = false):
value (v), enabled (e) {}
bool operator()(const Glib::ustring &val) const;
bool operator() (const Glib::ustring &val) const;
};
DynamicProfileRule();
bool matches(const rtengine::ImageMetaData *im) const;
bool operator<(const DynamicProfileRule &other) const;
bool matches (const rtengine::ImageMetaData *im) const;
bool operator< (const DynamicProfileRule &other) const;
int serial_number;
Range<int> iso;
@@ -61,7 +62,8 @@ public:
Glib::ustring profilepath;
};
class DynamicProfileRules {
class DynamicProfileRules
{
protected:
/** cache for dynamic profile rules */
std::vector<DynamicProfileRule> dynamicRules;
@@ -71,7 +73,7 @@ public:
bool loadRules();
bool storeRules();
const std::vector<DynamicProfileRule> &getRules() const;
void setRules(const std::vector<DynamicProfileRule> &r);
void setRules (const std::vector<DynamicProfileRule> &r);
};
#endif // _DYNAMICPROFILE_H_