Skip to content

Commit ec53583

Browse files
authored
Eliminate backend/frame.h. (#427)
Also clean up various header files and file headers along the way, mainly in the back-end module.
1 parent 9353683 commit ec53583

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+626
-474
lines changed

source/backend/bounding/boundingtask.cpp

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// @parblock
99
///
1010
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
11-
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
11+
/// Copyright 1991-2021 Persistence of Vision Raytracer Pty. Ltd.
1212
///
1313
/// POV-Ray is free software: you can redistribute it and/or modify
1414
/// it under the terms of the GNU Affero General Public License as
@@ -31,24 +31,32 @@
3131
///
3232
/// @endparblock
3333
///
34+
//------------------------------------------------------------------------------
35+
// SPDX-License-Identifier: AGPL-3.0-or-later
3436
//******************************************************************************
3537

38+
// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config)
39+
#include "backend/bounding/boundingtask.h"
40+
41+
// Standard C++ header files
3642
#include <set>
3743

44+
// Boost header files
3845
#include <boost/bind.hpp>
46+
#if POV_MULTITHREADED
3947
#include <boost/thread.hpp>
48+
#endif
4049

41-
// frame.h must always be the first POV file included (pulls in platform config)
42-
#include "backend/frame.h"
43-
#include "backend/bounding/boundingtask.h"
44-
50+
// POV-Ray header files (core module)
4551
#include "core/bounding/bsptree.h"
4652
#include "core/math/matrix.h"
4753
#include "core/scene/object.h"
4854
#include "core/scene/tracethreaddata.h"
4955

56+
// POV-Ray header files (POVMS module)
5057
#include "povms/povmsid.h"
5158

59+
// POV-Ray header files (backend module)
5260
#include "backend/scene/backendscenedata.h"
5361
#include "backend/support/task.h"
5462

@@ -224,4 +232,4 @@ void BoundingTask::SendFatalError(Exception& e)
224232
POVMS_SendMessage(msg);
225233
}
226234

227-
}
235+
} // end of namespace

source/backend/bounding/boundingtask.h

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// @parblock
99
///
1010
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
11-
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
11+
/// Copyright 1991-2021 Persistence of Vision Raytracer Pty. Ltd.
1212
///
1313
/// POV-Ray is free software: you can redistribute it and/or modify
1414
/// it under the terms of the GNU Affero General Public License as
@@ -31,14 +31,23 @@
3131
///
3232
/// @endparblock
3333
///
34+
//------------------------------------------------------------------------------
35+
// SPDX-License-Identifier: AGPL-3.0-or-later
3436
//******************************************************************************
3537

3638
#ifndef POVRAY_BACKEND_BOUNDINGTASK_H
3739
#define POVRAY_BACKEND_BOUNDINGTASK_H
3840

41+
// Module config header file must be the first file included within POV-Ray unit header files
42+
#include "backend/configbackend.h"
43+
44+
// Standard C++ header files
3945
#include <vector>
4046

41-
#include "backend/frame.h"
47+
// POV-Ray header files (core module)
48+
#include "core/coretypes.h"
49+
50+
// POV-Ray header files (backend module)
4251
#include "backend/render/rendertask.h"
4352

4453
namespace pov
@@ -67,6 +76,6 @@ class BoundingTask : public SceneTask
6776
void SendFatalError(pov_base::Exception& e);
6877
};
6978

70-
}
79+
} // end of namespace
7180

7281
#endif // POVRAY_BACKEND_BOUNDINGTASK_H

source/backend/configbackend.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/// @parblock
1111
///
1212
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
13-
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
13+
/// Copyright 1991-2021 Persistence of Vision Raytracer Pty. Ltd.
1414
///
1515
/// POV-Ray is free software: you can redistribute it and/or modify
1616
/// it under the terms of the GNU Affero General Public License as
@@ -33,6 +33,8 @@
3333
///
3434
/// @endparblock
3535
///
36+
//------------------------------------------------------------------------------
37+
// SPDX-License-Identifier: AGPL-3.0-or-later
3638
//******************************************************************************
3739

3840
#ifndef POVRAY_BACKEND_CONFIGBACKEND_H

source/backend/control/benchmark.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/// @parblock
1010
///
1111
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
12-
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
12+
/// Copyright 1991-2021 Persistence of Vision Raytracer Pty. Ltd.
1313
///
1414
/// POV-Ray is free software: you can redistribute it and/or modify
1515
/// it under the terms of the GNU Affero General Public License as
@@ -32,14 +32,17 @@
3232
///
3333
/// @endparblock
3434
///
35+
//------------------------------------------------------------------------------
36+
// SPDX-License-Identifier: AGPL-3.0-or-later
3537
//******************************************************************************
3638

37-
#include <cstdio>
38-
39-
// frame.h must always be the first POV file included (pulls in platform config)
40-
#include "backend/frame.h"
39+
// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config)
4140
#include "backend/control/benchmark.h"
4241

42+
// C++ variants of standard C header files
43+
#include <cstdio>
44+
45+
// POV-Ray header files (backend module)
4346
#include "backend/control/benchmark_ini.h"
4447
#include "backend/control/benchmark_pov.h"
4548

@@ -77,5 +80,4 @@ unsigned int Get_Benchmark_Version (void)
7780
return (0x0203) ; // Benchmark version 2.03
7881
}
7982

80-
}
81-
83+
} // end of namespace

source/backend/control/benchmark.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// @parblock
99
///
1010
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
11-
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
11+
/// Copyright 1991-2021 Persistence of Vision Raytracer Pty. Ltd.
1212
///
1313
/// POV-Ray is free software: you can redistribute it and/or modify
1414
/// it under the terms of the GNU Affero General Public License as
@@ -31,10 +31,15 @@
3131
///
3232
/// @endparblock
3333
///
34+
//------------------------------------------------------------------------------
35+
// SPDX-License-Identifier: AGPL-3.0-or-later
3436
//******************************************************************************
3537

36-
#ifndef BENCHMARK_H
37-
#define BENCHMARK_H
38+
#ifndef POVRAY_BACKEND_BENCHMARK_H
39+
#define POVRAY_BACKEND_BENCHMARK_H
40+
41+
// Module config header file must be the first file included within POV-Ray unit header files
42+
#include "backend/configbackend.h"
3843

3944
namespace pov
4045
{
@@ -46,6 +51,6 @@ namespace pov
4651
bool Write_Benchmark_File (const char *Scene_File_Name, const char *INI_File_Name) ;
4752
unsigned int Get_Benchmark_Version (void) ;
4853

49-
}
54+
} // end of namespace
5055

51-
#endif
56+
#endif // POVRAY_BACKEND_BENCHMARK_H

source/backend/control/messagefactory.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// @parblock
99
///
1010
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
11-
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
11+
/// Copyright 1991-2021 Persistence of Vision Raytracer Pty. Ltd.
1212
///
1313
/// POV-Ray is free software: you can redistribute it and/or modify
1414
/// it under the terms of the GNU Affero General Public License as
@@ -31,20 +31,26 @@
3131
///
3232
/// @endparblock
3333
///
34+
//------------------------------------------------------------------------------
35+
// SPDX-License-Identifier: AGPL-3.0-or-later
3436
//******************************************************************************
3537

36-
#include <boost/thread.hpp>
38+
// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config)
39+
#include "backend/control/messagefactory.h"
40+
41+
// Boost header files
3742
#include <boost/bind.hpp>
43+
#if POV_MULTITHREADED
44+
#include <boost/thread.hpp>
45+
#endif
3846

39-
// frame.h must always be the first POV file included (pulls in platform config)
40-
#include "backend/frame.h"
41-
#include "backend/control/messagefactory.h"
47+
// POV-Ray header files (base module)
48+
#include "base/pov_err.h"
4249

50+
// POV-Ray header files (POVMS module)
4351
#include "povms/povmscpp.h"
4452
#include "povms/povmsid.h"
4553

46-
#include "base/pov_err.h"
47-
4854
// this must be the last file included
4955
#include "base/povdebug.h"
5056

@@ -129,4 +135,4 @@ void MessageFactory::SendMessage(MessageClass mc, WarningLevel level, const char
129135
(void)POVMS_Send(nullptr, &msg, nullptr, kPOVMSSendMode_NoReply);
130136
}
131137

132-
}
138+
} // end of namespace

source/backend/control/messagefactory.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// @parblock
99
///
1010
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
11-
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
11+
/// Copyright 1991-2021 Persistence of Vision Raytracer Pty. Ltd.
1212
///
1313
/// POV-Ray is free software: you can redistribute it and/or modify
1414
/// it under the terms of the GNU Affero General Public License as
@@ -31,16 +31,24 @@
3131
///
3232
/// @endparblock
3333
///
34+
//------------------------------------------------------------------------------
35+
// SPDX-License-Identifier: AGPL-3.0-or-later
3436
//******************************************************************************
3537

3638
#ifndef POVRAY_BACKEND_MESSAGEFACTORY_H
3739
#define POVRAY_BACKEND_MESSAGEFACTORY_H
3840

39-
#include "povms/povmscpp.h"
40-
#include "povms/povmsid.h"
41+
// Module config header file must be the first file included within POV-Ray unit header files
42+
#include "backend/configbackend.h"
4143

44+
// POV-Ray header files (base module)
4245
#include "base/messenger.h"
4346

47+
// POV-Ray header files (POVMS module)
48+
#include "povms/povmscpp.h"
49+
#include "povms/povmsid.h"
50+
51+
// POV-Ray header files (backend module)
4452
#include "backend/control/renderbackend.h"
4553

4654
namespace pov
@@ -66,6 +74,6 @@ class MessageFactory : public GenericMessenger
6674
const UCS2 *filename = nullptr, POV_LONG line = -1, POV_LONG column = -1, POV_OFF_T offset = -1);
6775
};
6876

69-
}
77+
} // end of namespace
7078

7179
#endif // POVRAY_BACKEND_MESSAGEFACTORY_H

source/backend/control/renderbackend.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// @parblock
99
///
1010
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
11-
/// Copyright 1991-2018 Persistence of Vision Raytracer Pty. Ltd.
11+
/// Copyright 1991-2021 Persistence of Vision Raytracer Pty. Ltd.
1212
///
1313
/// POV-Ray is free software: you can redistribute it and/or modify
1414
/// it under the terms of the GNU Affero General Public License as
@@ -31,17 +31,21 @@
3131
///
3232
/// @endparblock
3333
///
34+
//------------------------------------------------------------------------------
35+
// SPDX-License-Identifier: AGPL-3.0-or-later
3436
//******************************************************************************
3537

36-
// frame.h must always be the first POV file included (pulls in platform config)
37-
#include "backend/frame.h"
38+
// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config)
3839
#include "backend/control/renderbackend.h"
3940

41+
// POV-Ray header files (base module)
42+
#include "base/pov_err.h"
43+
44+
// POV-Ray header files (POVMS module)
4045
#include "povms/povmscpp.h"
4146
#include "povms/povmsid.h"
4247

43-
#include "base/pov_err.h"
44-
48+
// POV-Ray header files (backend module)
4549
#include "backend/povray.h"
4650
#include "backend/control/scene.h"
4751
#include "backend/scene/view.h"
@@ -784,4 +788,4 @@ void RenderBackend::MakeDoneResult(POVMS_Message& result)
784788
result = newmsg;
785789
}
786790

787-
}
791+
} // end of namespace

source/backend/control/renderbackend.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// @parblock
99
///
1010
/// Persistence of Vision Ray Tracer ('POV-Ray') version 3.8.
11-
/// Copyright 1991-2017 Persistence of Vision Raytracer Pty. Ltd.
11+
/// Copyright 1991-2021 Persistence of Vision Raytracer Pty. Ltd.
1212
///
1313
/// POV-Ray is free software: you can redistribute it and/or modify
1414
/// it under the terms of the GNU Affero General Public License as
@@ -31,18 +31,26 @@
3131
///
3232
/// @endparblock
3333
///
34+
//------------------------------------------------------------------------------
35+
// SPDX-License-Identifier: AGPL-3.0-or-later
3436
//******************************************************************************
3537

3638
#ifndef POVRAY_BACKEND_RENDERBACKEND_H
3739
#define POVRAY_BACKEND_RENDERBACKEND_H
3840

41+
// Module config header file must be the first file included within POV-Ray unit header files
42+
#include "backend/configbackend.h"
43+
44+
// Standard C++ header files
3945
#include <map>
4046
#include <set>
4147

42-
#include "povms/povmscpp.h"
43-
48+
// POV-Ray header files (base module)
4449
#include "base/stringutilities.h"
4550

51+
// POV-Ray header files (POVMS module)
52+
#include "povms/povmscpp.h"
53+
4654
namespace pov
4755
{
4856

@@ -132,6 +140,6 @@ class RenderBackend : public POVMS_MessageReceiver
132140
void MakeDoneResult(POVMS_Message& result);
133141
};
134142

135-
}
143+
} // end of namespace
136144

137145
#endif // POVRAY_BACKEND_RENDERBACKEND_H

0 commit comments

Comments
 (0)