Skip to content

Commit

Permalink
Refactor Of Header Files
Browse files Browse the repository at this point in the history
Split up headers, predefine where we can, and use precompiled headers to speed up compile times. Includes some CString/QString changes to aid in the above where only a simple change was needed.
  • Loading branch information
SimonCSmith committed Mar 6, 2023
1 parent 9b772be commit 151e519
Show file tree
Hide file tree
Showing 294 changed files with 8,098 additions and 8,872 deletions.
3 changes: 1 addition & 2 deletions ChartCtrl/ChartAxis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
#include "ChartAxisLabel.h"
#include "ChartGrid.h"
#include "ChartCtrl.h"

#include "Math.h"
#include "ChartSerie.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
Expand Down
13 changes: 0 additions & 13 deletions ChartCtrl/ChartAxis.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,8 @@
*
*
*/

#if !defined(AFX_CHARTAXIS_H__063D695C_43CF_4A46_8AA0_C7E00268E0D3__INCLUDED_)
#define AFX_CHARTAXIS_H__063D695C_43CF_4A46_8AA0_C7E00268E0D3__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ChartObject.h"
#include <afx.h>

#include <string>
#include <list>

class CChartGrid;
class CChartSerie;
Expand Down Expand Up @@ -168,5 +157,3 @@ class CChartAxis : public CChartObject

COLORREF m_TextColor;
};

#endif // !defined(AFX_CHARTAXIS_H__063D695C_43CF_4A46_8AA0_C7E00268E0D3__INCLUDED_)
10 changes: 0 additions & 10 deletions ChartCtrl/ChartAxisLabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,9 @@
*
*
*/

#if !defined(AFX_CHARTAXISLABEL_H__0E5519C8_A2F4_4CED_9681_32A56B25D0C5__INCLUDED_)
#define AFX_CHARTAXISLABEL_H__0E5519C8_A2F4_4CED_9681_32A56B25D0C5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ChartObject.h"
#include <string>


class CChartAxis;

Expand Down Expand Up @@ -59,5 +51,3 @@ class CChartAxisLabel : public CChartObject
std::string m_strFontName;
std::string m_strLabelText;
};

#endif // !defined(AFX_CHARTAXISLABEL_H__0E5519C8_A2F4_4CED_9681_32A56B25D0C5__INCLUDED_)
3 changes: 3 additions & 0 deletions ChartCtrl/ChartCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
#include "ChartLineSerie.h"
#include "ChartPointsSerie.h"
#include "ChartSurfaceSerie.h"
#include "ChartLegend.h"
#include "ChartTitle.h"
#include "ChartAxis.h"

#define CHARTCTRL_CLASSNAME "ChartCtrl" // Window class name

Expand Down
27 changes: 4 additions & 23 deletions ChartCtrl/ChartCtrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,15 @@
*
*
*/


#if !defined(AFX_CHARTCTRL_H__5DDBAE42_77C3_4344_A207_3F39B623343B__INCLUDED_)
#define AFX_CHARTCTRL_H__5DDBAE42_77C3_4344_A207_3F39B623343B__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "ChartSerie.h"
#include "ChartAxis.h"
#include "ChartGrid.h"
#include "ChartLegend.h"
#include "ChartTitle.h"

#include <vector>



/////////////////////////////////////////////////////////////////////////////
// CChartCtrl window

class CChartLegend;
class CChartTitle;
class CChartAxis;
class CChartSerie;
class CChartCtrl : public CWnd
{

Expand Down Expand Up @@ -125,9 +112,3 @@ class CChartCtrl : public CWnd
CRect m_rectZoomArea;
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CHARTCTRL_H__5DDBAE42_77C3_4344_A207_3F39B623343B__INCLUDED_)
11 changes: 0 additions & 11 deletions ChartCtrl/ChartObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,7 @@
*
*
*/

#if !defined(AFX_CHARTOBJECT_H__6ED024F2_00D9_45D5_AB83_258EF0075288__INCLUDED_)
#define AFX_CHARTOBJECT_H__6ED024F2_00D9_45D5_AB83_258EF0075288__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <afx.h>
#include <afxwin.h>

class CChartCtrl;

Expand Down Expand Up @@ -97,5 +88,3 @@ class CChartObject
virtual void Draw(CDC* pDC) = 0;

};

#endif // !defined(AFX_CHARTOBJECT_H__6ED024F2_00D9_45D5_AB83_258EF0075288__INCLUDED_)
2 changes: 0 additions & 2 deletions ChartCtrl/ChartSerie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#include "ChartAxis.h"
#include "ChartCtrl.h"

#include "Math.h"


//////////////////////////////////////////////////////////////////////
// Construction/Destruction
Expand Down
16 changes: 1 addition & 15 deletions ChartCtrl/ChartSerie.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,14 @@
*
*
*/

#if !defined(AFX_CHARTSERIE_H__FFCF0E32_10E7_4A4D_9FF3_3C6177EDE4B1__INCLUDED_)
#define AFX_CHARTSERIE_H__FFCF0E32_10E7_4A4D_9FF3_3C6177EDE4B1__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ChartObject.h"
#include "ChartAxis.h"

#include <vector>
#include <string>

class CChartLineSerie;
class CChartPointsSerie;
class CChartLegend;



class CChartAxis;
class CChartSerie : public CChartObject
{
friend CChartCtrl;
Expand Down Expand Up @@ -106,5 +94,3 @@ class CChartSerie : public CChartObject
virtual void Draw(CDC* pDC) =0;
virtual void DrawAll(CDC *pDC) =0;
};

#endif // !defined(AFX_CHARTSERIE_H__FFCF0E32_10E7_4A4D_9FF3_3C6177EDE4B1__INCLUDED_)
3 changes: 1 addition & 2 deletions ChartCtrl/ChartSurfaceSerie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
#include "stdafx.h"
#include "ChartSurfaceSerie.h"
#include "ChartCtrl.h"

#include <algorithm>
#include "ChartAxis.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
Expand Down
7 changes: 0 additions & 7 deletions ChartCtrl/ChartSurfaceSerie.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CHARTSURFACESERIE_H__28A77823_43BD_4502_9AA7_A2B227454035__INCLUDED_)
#define AFX_CHARTSURFACESERIE_H__28A77823_43BD_4502_9AA7_A2B227454035__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ChartSerie.h"

Expand Down Expand Up @@ -69,5 +64,3 @@ class CChartSurfaceSerie : public CChartSerie
// the curve and the corresponding vertical axis)
bool m_bHorizontal;
};

#endif // !defined(AFX_CHARTSURFACESERIE_H__28A77823_43BD_4502_9AA7_A2B227454035__INCLUDED_)
18 changes: 9 additions & 9 deletions DeepSkyStacker.VS2019.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DeepSkyStackerCL", "DeepSky
ProjectSection(ProjectDependencies) = postProject
{1747F255-9CB9-472B-8FEE-9E0BBFBAD49D} = {1747F255-9CB9-472B-8FEE-9E0BBFBAD49D}
{A2F500C6-6903-4C2D-906D-CE86B99BA50D} = {A2F500C6-6903-4C2D-906D-CE86B99BA50D}
{767E57ED-6D37-32A1-B51E-C39E7C1CD02A} = {767E57ED-6D37-32A1-B51E-C39E7C1CD02A}
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DeepSkyStackerLive", "DeepSkyStackerLive\DeepSkyStackerLive.vcxproj", "{6290D6C2-900F-496C-A522-D5C8BF807066}"
ProjectSection(ProjectDependencies) = postProject
{D5FB2402-A821-4474-91E7-07F0DD5866F0} = {D5FB2402-A821-4474-91E7-07F0DD5866F0}
{A2F500C6-6903-4C2D-906D-CE86B99BA50D} = {A2F500C6-6903-4C2D-906D-CE86B99BA50D}
{767E57ED-6D37-32A1-B51E-C39E7C1CD02A} = {767E57ED-6D37-32A1-B51E-C39E7C1CD02A}
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DeepSkyStacker", "DeepSkyStacker\DeepSkyStacker.vcxproj", "{90721C24-BC43-450A-ADED-3417280D075B}"
ProjectSection(ProjectDependencies) = postProject
{767E57ED-6D37-32A1-B51E-C39E7C1CD02A} = {767E57ED-6D37-32A1-B51E-C39E7C1CD02A}
{A71D2131-F425-381F-8A9A-29D60132A046} = {A71D2131-F425-381F-8A9A-29D60132A046}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpg", "libjpg\libjpg.vcxproj", "{A2F500C6-6903-4C2D-906D-CE86B99BA50D}"
Expand All @@ -30,7 +30,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtiff", "LibTiff\libtiff.
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZCLass", "ZCLass\ZCLass.vcxproj", "{1747F255-9CB9-472B-8FEE-9E0BBFBAD49D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libraw", "LibRaw\buildfiles\libraw.vcxproj", "{767E57ED-6D37-32A1-B51E-C39E7C1CD02A}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libraw", "LibRaw\buildfiles\libraw.vcxproj", "{A71D2131-F425-381F-8A9A-29D60132A046}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6E9EC8B1-5EAC-4F7F-8989-EFED16DA4B7A}"
EndProject
Expand Down Expand Up @@ -69,10 +69,10 @@ Global
{1747F255-9CB9-472B-8FEE-9E0BBFBAD49D}.Debug|x64.Build.0 = Debug|x64
{1747F255-9CB9-472B-8FEE-9E0BBFBAD49D}.Release|x64.ActiveCfg = Release|x64
{1747F255-9CB9-472B-8FEE-9E0BBFBAD49D}.Release|x64.Build.0 = Release|x64
{767E57ED-6D37-32A1-B51E-C39E7C1CD02A}.Debug|x64.ActiveCfg = Debug|x64
{767E57ED-6D37-32A1-B51E-C39E7C1CD02A}.Debug|x64.Build.0 = Debug|x64
{767E57ED-6D37-32A1-B51E-C39E7C1CD02A}.Release|x64.ActiveCfg = Release|x64
{767E57ED-6D37-32A1-B51E-C39E7C1CD02A}.Release|x64.Build.0 = Release|x64
{A71D2131-F425-381F-8A9A-29D60132A046}.Debug|x64.ActiveCfg = Debug|x64
{A71D2131-F425-381F-8A9A-29D60132A046}.Debug|x64.Build.0 = Debug|x64
{A71D2131-F425-381F-8A9A-29D60132A046}.Release|x64.ActiveCfg = Release|x64
{A71D2131-F425-381F-8A9A-29D60132A046}.Release|x64.Build.0 = Release|x64
{487E5070-BF81-4DEF-BE9F-510EEACE627B}.Debug|x64.ActiveCfg = Debug|x64
{487E5070-BF81-4DEF-BE9F-510EEACE627B}.Debug|x64.Build.0 = Debug|x64
{487E5070-BF81-4DEF-BE9F-510EEACE627B}.Release|x64.ActiveCfg = Release|x64
Expand All @@ -85,7 +85,7 @@ Global
{A2F500C6-6903-4C2D-906D-CE86B99BA50D} = {A8F4069D-F6D1-4A9A-A4E5-9A22B411D691}
{D5FB2402-A821-4474-91E7-07F0DD5866F0} = {A8F4069D-F6D1-4A9A-A4E5-9A22B411D691}
{1747F255-9CB9-472B-8FEE-9E0BBFBAD49D} = {A8F4069D-F6D1-4A9A-A4E5-9A22B411D691}
{767E57ED-6D37-32A1-B51E-C39E7C1CD02A} = {A8F4069D-F6D1-4A9A-A4E5-9A22B411D691}
{A71D2131-F425-381F-8A9A-29D60132A046} = {A8F4069D-F6D1-4A9A-A4E5-9A22B411D691}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {64F56483-090C-45A4-9437-FC1753EF3BA5}
Expand Down
12 changes: 8 additions & 4 deletions DeepSkyStacker/AHDDemosaicing.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#include <stdafx.h>
#include "resource.h"
#include "BitmapExt.h"
#include "AHDDemosaicing.h"
#include <vector>
#include "DSSProgress.h"
#include <omp.h>
#include "AHDDemosaicing.h"
#include "ColorBitmap.h"
#include "Ztrace.h"
#include "DSSProgress.h"
#include "Multitask.h"
#include "ColorHelpers.h"
#include "DSSTools.h"

using namespace DSS;

static std::vector<float> g_vLUT;

Expand Down
3 changes: 3 additions & 0 deletions DeepSkyStacker/AHDDemosaicing.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef __AHDDEMOSAICING_H__
#define __AHDDEMOSAICING_H__
#include "GrayBitmap.h"

namespace DSS { class ProgressBase; }
using namespace DSS;

template <typename T>
bool AHDDemosaicing(CGrayBitmapT<T> * pGrayInputBitmap, std::shared_ptr<CMemoryBitmap>& rpColorBitmap, ProgressBase* pProgress);
Expand Down
35 changes: 6 additions & 29 deletions DeepSkyStacker/About.cpp
Original file line number Diff line number Diff line change
@@ -1,39 +1,16 @@
#include <algorithm>
using std::min;
using std::max;

#define _WIN32_WINNT _WIN32_WINNT_WIN7
#include <afx.h>
#include <afxcmn.h>
#include <afxcview.h>
#include <afxwin.h>

#include <ZExcept.h>
#include <Ztrace.h>
#include <QDir>
#include <QLibraryInfo>
#include <QSettings>
#include <QString>
#include <QDebug>
#include <QTranslator>
#include <QShowEvent>

#include "commonresource.h"
#include "stdafx.h"
#include "About.h"
#include "ui/ui_About.h"
#include "DSSVersion.h"
#include "libraw/libraw_version.h"
#include "fitsio.h"
#include "tiffio.h"
#include "DeepSkyStacker.h"

extern bool g_bShowRefStars;
extern QTranslator theAppTranslator;
extern QTranslator theQtTranslator;

#include "DeepSkyStacker.h"
#include "DSSCommon.h"
#include "commonresource.h"
#include "DSSVersion.h"
#include <fitsio.h>
#include <tiffio.h>
#include <libraw/libraw_version.h>

#define xstr(s) str(s)
#define str(s) #s

Expand Down
7 changes: 2 additions & 5 deletions DeepSkyStacker/AlignmentParameters.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#include "stdafx.h"
#include "AlignmentParameters.h"
#include "ui/ui_AlignmentParameters.h"

#include <ZExcept.h>
#include <Ztrace.h>

#include "DSSCommon.h"
#include "Workspace.h"
#include "DSSCommon.h"

AlignmentParameters::AlignmentParameters(QWidget *parent) :
QWidget(parent),
Expand Down
7 changes: 1 addition & 6 deletions DeepSkyStacker/AlignmentParameters.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#ifndef ALIGNMENTPARAMETERS_H
#define ALIGNMENTPARAMETERS_H

#include <QWidget>
#pragma once

class Workspace;

Expand Down Expand Up @@ -42,5 +39,3 @@ private slots:

private:
};

#endif // ALIGNMENTPARAMETERS_H
1 change: 1 addition & 0 deletions DeepSkyStacker/AskRegistering.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifndef __ASKREGISTERING_H__
#define __ASKREGISTERING_H__
#include "commonresource.h"

typedef enum tagASKREGISTERINGANSWER
{
Expand Down
2 changes: 2 additions & 0 deletions DeepSkyStacker/BackgroundCalibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include "DSSProgress.h"
#include "StackingTasks.h"
#include "avx_histogram.h"
#include "Multitask.h"
#include "Ztrace.h"

CBackgroundCalibration::CBackgroundCalibration() :
m_bInitOk{ false },
Expand Down
6 changes: 6 additions & 0 deletions DeepSkyStacker/BackgroundCalibration.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#ifndef __BACKGROUNDCALIBRATION_H__
#define __BACKGROUNDCALIBRATION_H__
#include "DSSCommon.h"
#include "RationalInterpolation.h"
#include "LinearInterpolationh.h"

class CMemoryBitmap;
namespace DSS { class ProgressBase; }
using namespace DSS;

class CBackgroundCalibration
{
Expand Down
Loading

0 comments on commit 151e519

Please sign in to comment.