Formatted all .cc and .h code in rtengine, rtexif and rtgui using astyle

This commit is contained in:
DrSlony
2015-08-11 11:55:03 +02:00
parent effb46c3e1
commit 0e0cfb9b25
452 changed files with 133354 additions and 99460 deletions

View File

@@ -7,7 +7,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -22,71 +22,83 @@
#include <cmath>
#include "rawimage.h"
namespace rtengine{
namespace rtengine
{
class dfInfo
{
public:
Glib::ustring pathname; // filename of dark frame
std::list<Glib::ustring> pathNames; // other similar dark frames, used for average
std::string maker; ///< manufacturer
std::string model; ///< model
int iso; ///< ISO (gain)
double shutter; ///< shutter or exposure time in sec
time_t timestamp; ///< seconds since 1 Jan 1970
Glib::ustring pathname; // filename of dark frame
std::list<Glib::ustring> pathNames; // other similar dark frames, used for average
std::string maker; ///< manufacturer
std::string model; ///< model
int iso; ///< ISO (gain)
double shutter; ///< shutter or exposure time in sec
time_t timestamp; ///< seconds since 1 Jan 1970
dfInfo(const Glib::ustring &name, const std::string &mak, const std::string &mod,int iso,double shut,time_t t)
:pathname(name),maker(mak),model(mod),iso(iso),shutter(shut),timestamp(t),ri(NULL){}
dfInfo(const Glib::ustring &name, const std::string &mak, const std::string &mod, int iso, double shut, time_t t)
: pathname(name), maker(mak), model(mod), iso(iso), shutter(shut), timestamp(t), ri(NULL) {}
dfInfo( const dfInfo &o)
:pathname(o.pathname),maker(o.maker),model(o.model),iso(o.iso),shutter(o.shutter),timestamp(o.timestamp),ri(NULL){}
~dfInfo() { if( ri ) delete ri; }
dfInfo( const dfInfo &o)
: pathname(o.pathname), maker(o.maker), model(o.model), iso(o.iso), shutter(o.shutter), timestamp(o.timestamp), ri(NULL) {}
~dfInfo()
{
if( ri ) {
delete ri;
}
}
dfInfo &operator =(const dfInfo &o);
bool operator <(const dfInfo &e2) const;
// Calculate virtual distance between two shots; different model return infinite
double distance(const std::string &mak, const std::string &mod, int iso, double shutter) const;
dfInfo &operator =(const dfInfo &o);
bool operator <(const dfInfo &e2) const;
static std::string key(const std::string &mak, const std::string &mod, int iso, double shut );
std::string key(){ return key( maker,model,iso,shutter); }
// Calculate virtual distance between two shots; different model return infinite
double distance(const std::string &mak, const std::string &mod, int iso, double shutter) const;
RawImage *getRawImage();
std::vector<badPix> &getHotPixels();
static std::string key(const std::string &mak, const std::string &mod, int iso, double shut );
std::string key()
{
return key( maker, model, iso, shutter);
}
RawImage *getRawImage();
std::vector<badPix> &getHotPixels();
protected:
RawImage *ri; ///< Dark Frame raw data
std::vector<badPix> badPixels; ///< Extracted hot pixels
RawImage *ri; ///< Dark Frame raw data
std::vector<badPix> badPixels; ///< Extracted hot pixels
void updateBadPixelList( RawImage *df );
void updateRawImage();
void updateBadPixelList( RawImage *df );
void updateRawImage();
};
class DFManager
{
public:
void init( Glib::ustring pathname );
Glib::ustring getPathname(){ return currentPath; };
void getStat( int &totFiles, int &totTemplate);
RawImage *searchDarkFrame( const std::string &mak, const std::string &mod, int iso, double shut, time_t t );
RawImage *searchDarkFrame( const Glib::ustring filename );
std::vector<badPix> *getHotPixels ( const std::string &mak, const std::string &mod, int iso, double shut, time_t t );
std::vector<badPix> *getHotPixels ( const Glib::ustring filename );
std::vector<badPix> *getBadPixels ( const std::string &mak, const std::string &mod, const std::string &serial);
void init( Glib::ustring pathname );
Glib::ustring getPathname()
{
return currentPath;
};
void getStat( int &totFiles, int &totTemplate);
RawImage *searchDarkFrame( const std::string &mak, const std::string &mod, int iso, double shut, time_t t );
RawImage *searchDarkFrame( const Glib::ustring filename );
std::vector<badPix> *getHotPixels ( const std::string &mak, const std::string &mod, int iso, double shut, time_t t );
std::vector<badPix> *getHotPixels ( const Glib::ustring filename );
std::vector<badPix> *getBadPixels ( const std::string &mak, const std::string &mod, const std::string &serial);
protected:
typedef std::multimap<std::string,dfInfo> dfList_t;
typedef std::map<std::string, std::vector<badPix> > bpList_t;
dfList_t dfList;
bpList_t bpList;
bool initialized;
Glib::ustring currentPath;
dfInfo *addFileInfo(const Glib::ustring &filename, bool pool=true );
dfInfo *find( const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t );
int scanBadPixelsFile( Glib::ustring filename );
typedef std::multimap<std::string, dfInfo> dfList_t;
typedef std::map<std::string, std::vector<badPix> > bpList_t;
dfList_t dfList;
bpList_t bpList;
bool initialized;
Glib::ustring currentPath;
dfInfo *addFileInfo(const Glib::ustring &filename, bool pool = true );
dfInfo *find( const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t );
int scanBadPixelsFile( Glib::ustring filename );
};
extern DFManager dfm;