Global pass over optimizing includes (#3862)

This commit is contained in:
Alexander Bock
2025-12-08 20:13:31 +01:00
committed by GitHub
parent e81129c42e
commit 6b20d114c8
234 changed files with 459 additions and 710 deletions

View File

@@ -26,7 +26,6 @@
#include <ghoul/filesystem/filesystem.h>
#include <QPainter>
#include <QPixmap>
#include <random>
BackgroundImage::BackgroundImage(QRect size, const std::filesystem::path& syncFolder,

View File

@@ -31,17 +31,14 @@
#include "splitcombobox.h"
#include <openspace/openspace.h>
#include <ghoul/filesystem/filesystem.h>
#include <ghoul/logging/logmanager.h>
#include <ghoul/misc/assert.h>
#include <sgct/config.h>
#include <QFile>
#include <QKeyEvent>
#include <QLabel>
#include <QMenu>
#include <QMessageBox>
#include <QPushButton>
#include <QStandardItemModel>
#include <filesystem>
#include <fstream>
#include <iostream>
using namespace openspace;
@@ -148,9 +145,18 @@ LauncherWindow::LauncherWindow(bool profileEnabled, const Configuration& globalC
{
QFile file(":/qss/launcher.qss");
file.open(QFile::ReadOnly);
const QString styleSheet = QLatin1String(file.readAll());
setStyleSheet(styleSheet);
const bool success = file.open(QFile::ReadOnly);
if (!success) {
QMessageBox::critical(
this,
"Missing QSS",
"Could not find launcher.qss"
);
}
else {
const QString styleSheet = QLatin1String(file.readAll());
setStyleSheet(styleSheet);
}
}
QWidget* centralWidget = new QWidget;

View File

@@ -31,11 +31,9 @@
#include <ghoul/misc/assert.h>
#include <ghoul/misc/stringhelper.h>
#include <QGuiApplication>
#include <QStyleHints>
#include <QTimer>
#include <scn/scan.h>
#include <date/date.h>
#include <string_view>
#include <vector>
using namespace openspace;

View File

@@ -27,21 +27,19 @@
#include "profile/line.h"
#include "profile/scriptlogdialog.h"
#include <openspace/util/keys.h>
#include <ghoul/format.h>
#include <ghoul/misc/assert.h>
#include <QCheckBox>
#include <QComboBox>
#include <QDialogButtonBox>
#include <QErrorMessage>
#include <QGridLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
#include <QListWidget>
#include <QListWidgetItem>
#include <QMessageBox>
#include <QPushButton>
#include <QTextEdit>
#include <QVBoxLayout>
#include <algorithm>
using namespace openspace;

View File

@@ -26,15 +26,18 @@
#include "profile/line.h"
#include "profile/scriptlogdialog.h"
#include <openspace/scene/profile.h>
#include <ghoul/misc/stringhelper.h>
#include <QDialogButtonBox>
#include <QHBoxLayout>
#include <QLabel>
#include <QPushButton>
#include <QTextEdit>
#include <QVBoxLayout>
#include <ios>
#include <new>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
AdditionalScriptsDialog::AdditionalScriptsDialog(QWidget* parent,
std::vector<std::string>* scripts)

View File

@@ -26,17 +26,10 @@
#include "profile/horizonsdialog.h"
#include "profile/line.h"
#include <openspace/scene/asset.h>
#include <QComboBox>
#include <QDialogButtonBox>
#include <QFileDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QVBoxLayout>
#include <QWidget>
#include <filesystem>
#include <string>
AssetEdit::AssetEdit(QWidget* parent)
: QDialog(parent)

View File

@@ -27,7 +27,6 @@
#include "profile/assetedit.h"
#include "profile/line.h"
#include <openspace/scene/profile.h>
#include <ghoul/format.h>
#include <QDialogButtonBox>
#include <QHeaderView>
#include <QLabel>
@@ -35,6 +34,7 @@
#include <QVBoxLayout>
#include <QTextEdit>
#include <QTreeView>
#include <filesystem>
namespace {
bool traverseToExpandSelectedItems(QTreeView& tree, AssetTreeModel& model, int rows,

View File

@@ -22,12 +22,12 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include "profile/assettreeitem.h"
#include "profile/assettreemodel.h"
#include "profile/assettreeitem.h"
#include "filesystemaccess.h"
#include <ghoul/misc/stringhelper.h>
#include <sstream>
#include <QColor>
namespace {
constexpr std::string_view Header1 = "Asset";

View File

@@ -27,17 +27,11 @@
#include "profile/line.h"
#include <openspace/navigation/navigationstate.h>
#include <QDialogButtonBox>
#include <QDoubleValidator>
#include <QFileDialog>
#include <QFrame>
#include <QGridLayout>
#include <QKeyEvent>
#include <QLabel>
#include <QLineEdit>
#include <QMessageBox>
#include <QPlainTextEdit>
#include <QPushButton>
#include <QTabWidget>
#include <fstream>
namespace {

View File

@@ -25,22 +25,24 @@
#include "profile/deltatimesdialog.h"
#include "profile/line.h"
#include <openspace/scene/profile.h>
#include <ghoul/format.h>
#include <QComboBox>
#include <QDialogButtonBox>
#include <QDoubleValidator>
#include <QEvent>
#include <QKeyEvent>
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
#include <QListWidget>
#include <QMessageBox>
#include <QPushButton>
#include <QVBoxLayout>
#include <array>
#include <cstdint>
#include <cstdlib>
#include <format>
#include <iostream>
#include <new>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
namespace {
constexpr int MaxNumberOfKeys = 30;

View File

@@ -26,9 +26,7 @@
#include "profile/line.h"
#include <ghoul/filesystem/filesystem.h>
#include <ghoul/format.h>
#include <ghoul/logging/logmanager.h>
#include <ghoul/misc/boolean.h>
#include <QComboBox>
#include <QDateTimeEdit>
#include <QDialogButtonBox>
@@ -36,7 +34,6 @@
#include <QFileDialog>
#include <QGridLayout>
#include <QLabel>
#include <QLineEdit>
#include <QMessageBox>
#include <QNetworkAccessManager>
#include <QNetworkReply>
@@ -44,12 +41,10 @@
#include <QProgressBar>
#include <QPushButton>
#include <QScrollBar>
#include <QStyle>
#include <filesystem>
#include <istream>
#include <sstream>
//using json = nlohmann::json;
//using namespace openspace;
namespace {
constexpr std::string_view _loggerCat = "HorizonsDialog";

View File

@@ -25,15 +25,16 @@
#include "profile/marknodesdialog.h"
#include "profile/line.h"
#include <openspace/scene/profile.h>
#include <QDialogButtonBox>
#include <QEvent>
#include <QKeyEvent>
#include <QLabel>
#include <QLineEdit>
#include <QListWidget>
#include <QPushButton>
#include <QVBoxLayout>
#include <new>
#include <string>
#include <utility>
#include <vector>
MarkNodesDialog::MarkNodesDialog(QWidget* parent, std::vector<std::string>* markedNodes)
: QDialog(parent)

View File

@@ -27,12 +27,10 @@
#include "profile/line.h"
#include <openspace/scene/profile.h>
#include <QDialogButtonBox>
#include <QKeyEvent>
#include <QLabel>
#include <QLineEdit>
#include <QTextEdit>
#include <QVBoxLayout>
#include <algorithm>
#include <optional>
MetaDialog::MetaDialog(QWidget* parent, std::optional<openspace::Profile::Meta>* meta)
: QDialog(parent)

View File

@@ -26,11 +26,9 @@
#include "profile/line.h"
#include <QDialogButtonBox>
#include <QEvent>
#include <QKeyEvent>
#include <QLabel>
#include <QListWidget>
#include <QLineEdit>
#include <QMessageBox>
#include <QPushButton>
#include <QVBoxLayout>

View File

@@ -37,20 +37,19 @@
#include "profile/timedialog.h"
#include "profile/uipanelsdialog.h"
#include <openspace/scene/profile.h>
#include <ghoul/format.h>
#include <QDialogButtonBox>
#include <QFileDialog>
#include <QKeyEvent>
#include <QLabel>
#include <QLineEdit>
#include <QMessageBox>
#include <QPushButton>
#include <QTextEdit>
#include <QVBoxLayout>
#include <QWidget>
#include <algorithm>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <ios>
#ifdef WIN32
#include <Windows.h>

View File

@@ -26,20 +26,14 @@
#include "profile/line.h"
#include "profile/scriptlogdialog.h"
#include <ghoul/filesystem/filesystem.h>
#include <QComboBox>
#include <QDialogButtonBox>
#include <QEvent>
#include <QFile>
#include <QKeyEvent>
#include <QLabel>
#include <QLineEdit>
#include <QListWidget>
#include <QMessageBox>
#include <QPushButton>
#include <QTextStream>
#include <QVBoxLayout>
#include <iostream>
using namespace openspace;

View File

@@ -27,19 +27,21 @@
#include "profile/line.h"
#include <openspace/engine/configuration.h>
#include <openspace/engine/globals.h>
#include <openspace/scene/profile.h>
#include <ghoul/filesystem/filesystem.h>
#include <ghoul/format.h>
#include <QGridLayout>
#include <QDialogButtonBox>
#include <QFileDialog>
#include <QLabel>
#include <QLineEdit>
#include <QListWidget>
#include <QFile>
#include <QPushButton>
#include <QTextStream>
#include <QTimer>
#include <algorithm>
#include <filesystem>
#include <format>
#include <new>
#include <string>
#include <utility>
#include <vector>
ScriptLogDialog::ScriptLogDialog(QWidget* parent, std::string filter)
: QDialog(parent)

View File

@@ -26,16 +26,12 @@
#include "profile/line.h"
#include <QCheckBox>
#include <QComboBox>
#include <QDateTimeEdit>
#include <QDialogButtonBox>
#include <QKeyEvent>
#include <QLabel>
#include <QLineEdit>
#include <QTabWidget>
#include <QVBoxLayout>
#include <format>
#include <algorithm>
#include <optional>
using namespace openspace;

View File

@@ -25,14 +25,11 @@
#include "settingsdialog.h"
#include "profile/line.h"
#include <QCheckBox>
#include <QComboBox>
#include <QDialogButtonBox>
#include <QGridLayout>
#include <QLabel>
#include <QLineEdit>
#include <QMessageBox>
#include <QPushButton>
SettingsDialog::SettingsDialog(openspace::Settings settings, QWidget* parent)

View File

@@ -25,14 +25,11 @@
#include "sgctedit/displaywindowunion.h"
#include "sgctedit/windowcontrol.h"
#include <ghoul/format.h>
#include <ghoul/misc/assert.h>
#include <QColor>
#include <QFrame>
#include <QPushButton>
#include <QVBoxLayout>
#include <array>
#include <string>
#include <algorithm>
#include <optional>
namespace {
template <class... Ts> struct overloaded : Ts... { using Ts::operator()...; };

View File

@@ -24,7 +24,6 @@
#include "sgctedit/monitorbox.h"
#include <ghoul/misc/assert.h>
#include "windowcolors.h"
#include <QPainter>

View File

@@ -26,13 +26,10 @@
#include <sgctedit/displaywindowunion.h>
#include <sgctedit/monitorbox.h>
#include <sgctedit/windowcontrol.h>
#include <ghoul/filesystem/filesystem.h>
#include <ghoul/misc/assert.h>
#include <QApplication>
#include <QCheckBox>
#include <QColor>
#include <QComboBox>
#include <QFileDialog>
#include <QLabel>
#include <QMessageBox>

View File

@@ -24,19 +24,18 @@
#include "sgctedit/windowcontrol.h"
#include <ghoul/format.h>
#include <ghoul/misc/assert.h>
#include "sgctedit/displaywindowunion.h"
#include "windowcolors.h"
#include <QCheckBox>
#include <QComboBox>
#include <QGridLayout>
#include <QLabel>
#include <QLayout>
#include <QLineEdit>
#include <QPushButton>
#include <QSpinBox>
#include <algorithm>
#include <numbers>
#include <optional>
namespace {
std::array<std::pair<int, std::string>, 10> Quality = {

View File

@@ -26,8 +26,6 @@
#include "usericon.h"
#include <ghoul/filesystem/filesystem.h>
#include <ghoul/misc/assert.h>
#include <QPainter>
#include <QStandardItemModel>
SplitComboBox::SplitComboBox(QWidget* parent, std::filesystem::path userPath,

View File

@@ -25,6 +25,7 @@
#include "windowcolors.h"
#include <ghoul/misc/assert.h>
#include <array>
QColor colorForWindow(int idx) {
constexpr std::array<QColor, 4> Hardcoded = {

View File

@@ -56,7 +56,7 @@ public:
* Used to explicitly show which variables within the Camera class that are used
* for caching.
*/
template<typename T>
template <typename T>
struct Cached {
T datum = T(0);
bool isDirty = true;

View File

@@ -27,8 +27,6 @@
#include <openspace/data/datamapping.h>
#include <ghoul/glm.h>
#include <ghoul/misc/boolean.h>
#include <ghoul/misc/csvreader.h>
#include <filesystem>
#include <optional>
#include <string>

View File

@@ -29,8 +29,8 @@
#include <string>
#include <vector>
namespace openspace::documentation { struct Documentation; }
namespace ghoul { class Dictionary; }
namespace openspace::documentation { struct Documentation; }
namespace openspace::dataloader {
@@ -62,8 +62,8 @@ struct DataMapping {
};
/**
* Generate a string based on the data mapping, that can be used to uniquely
* identify the dataset.
* Generate a string based on the data mapping, that can be used to uniquely identify the
* dataset.
*/
std::string generateHashString(const DataMapping& dm);

View File

@@ -28,13 +28,12 @@
#include <openspace/documentation/documentation.h>
#include <openspace/json.h>
#include <openspace/properties/propertyowner.h>
#include <ghoul/misc/exception.h>
namespace openspace::documentation {
/**
* The DocumentationEngine has the ability to collect all Documentation%s that are
* produced in the application an write them out as a documentation file for human
* produced in the application and write them out as a documentation file for human
* consumption.
*/
class DocumentationEngine {

View File

@@ -84,7 +84,7 @@ public:
// Just a helper function to check if a future is ready to ".get()". Not specific
// to DownloadManager but is useful for anyone using the DownloadManager
template<typename R>
template <typename R>
static bool futureReady(std::future<R> const& f) {
return f.wait_for(std::chrono::seconds(0)) == std::future_status::ready;
}

View File

@@ -30,16 +30,14 @@ namespace openspace {
template <class ModuleSubClass>
ModuleSubClass* ModuleEngine::module() const {
const auto it = std::find_if(_modules.begin(), _modules.end(),
const auto it = std::find_if(
_modules.begin(),
_modules.end(),
[](const std::unique_ptr<OpenSpaceModule>& m) {
return m->identifier() == ModuleSubClass::Name;
});
if (it != _modules.end()) {
return dynamic_cast<ModuleSubClass*>(it->get());
}
else {
return nullptr;
}
return m->identifier() == ModuleSubClass::Name;
}
);
return it != _modules.end() ? dynamic_cast<ModuleSubClass*>(it->get()) : nullptr;
}
} // namespace openspace

View File

@@ -27,7 +27,6 @@
#include <openspace/engine/globalscallbacks.h>
#include <openspace/properties/misc/optionproperty.h>
#include <openspace/properties/misc/stringproperty.h>
#include <openspace/properties/propertyowner.h>
#include <openspace/properties/property.h>
#include <openspace/properties/scalar/boolproperty.h>

View File

@@ -28,7 +28,6 @@
#include <openspace/util/syncbuffer.h>
#include <ghoul/misc/boolean.h>
#include <memory>
#include <vector>
namespace openspace {

View File

@@ -30,15 +30,15 @@
#include <ghoul/misc/dictionary.h>
namespace openspace {
namespace properties { class Property; }
namespace properties { class Property; }
class Camera;
class Layer;
class Profile;
class Renderable;
class SceneGraphNode;
class ScreenSpaceRenderable;
class Time;
class Camera;
class Layer;
class Profile;
class Renderable;
class SceneGraphNode;
class ScreenSpaceRenderable;
class Time;
} // namespace openspace
namespace openspace::events {
@@ -171,8 +171,8 @@ struct EventAssetLoading : public Event {
* Creates an instance of an AssetLoading event.
*
* \param assetPath_ The path to the asset
* \param state_ The new state of the asset given by 'asstPath_'; is one of `Loading`,
* `Loaded`, `Unloaded`, or `Error`
* \param newState The new state of the asset given by 'asstPath_'; is one of
`Loading`, `Loaded`, `Unloaded`, or `Error`
*/
EventAssetLoading(const std::filesystem::path& assetPath_, State newState);

View File

@@ -55,7 +55,7 @@ public:
void resetVelocities();
/**
* Returns true if any of the velocities are larger than zero, i.e. wether an
* Returns true if any of the velocities are larger than zero, i.e. whether an
* interaction happened.
*/
bool hasNonZeroVelocities(bool checkOnlyMovement = false) const;
@@ -63,7 +63,7 @@ public:
protected:
template <typename T>
struct InteractionState {
InteractionState(double scaleFactor);
explicit InteractionState(double scaleFactor);
void setFriction(double friction);
void setVelocityScaleFactor(double scaleFactor);

View File

@@ -29,7 +29,6 @@
#include <openspace/interaction/joystickinputstate.h>
#include <ghoul/misc/boolean.h>
#include <ghoul/misc/stringconversion.h>
#include <map>
#include <vector>

View File

@@ -25,12 +25,9 @@
#ifndef __OPENSPACE_CORE___JOYSTICKINPUTSTATE___H__
#define __OPENSPACE_CORE___JOYSTICKINPUTSTATE___H__
#include <ghoul/format.h>
#include <ghoul/misc/assert.h>
#include <ghoul/misc/exception.h>
#include <ghoul/misc/stringconversion.h>
#include <array>
#include <memory>
#include <string>
namespace openspace::interaction {

View File

@@ -27,6 +27,8 @@
#include <openspace/interaction/camerainteractionstates.h>
#include <ghoul/glm.h>
namespace openspace::interaction {
class ScriptCameraStates : public CameraInteractionStates {

View File

@@ -29,7 +29,6 @@
#include <openspace/interaction/websocketinputstate.h>
#include <ghoul/misc/boolean.h>
#include <ghoul/misc/stringconversion.h>
#include <map>
#include <vector>

View File

@@ -27,9 +27,7 @@
#include <ghoul/misc/assert.h>
#include <ghoul/misc/exception.h>
#include <ghoul/misc/stringconversion.h>
#include <array>
#include <memory>
#include <unordered_map>
#include <string>

View File

@@ -27,8 +27,6 @@
#include <openspace/mission/mission.h>
#include <ghoul/misc/assert.h>
#include <ghoul/misc/exception.h>
#include <map>
#include <string>

View File

@@ -51,10 +51,7 @@ namespace openspace::scripting { struct LuaLibrary; }
namespace openspace::interaction {
struct JoystickInputStates;
class KeyframeNavigator;
struct NavigationState;
class OrbitalNavigator;
class PathNavigator;
struct NodeCameraStateSpec;
struct WebsocketInputStates;

View File

@@ -29,9 +29,7 @@
#include <openspace/json.h>
#include <optional>
namespace openspace {
struct CameraPose;
} // namespace openspace
namespace openspace { struct CameraPose; }
namespace openspace::interaction {

View File

@@ -27,7 +27,6 @@
#include <openspace/properties/propertyowner.h>
#include <openspace/interaction/delayedvariable.h>
#include <openspace/interaction/interpolator.h>
#include <openspace/interaction/joystickcamerastates.h>
#include <openspace/interaction/mousecamerastates.h>

View File

@@ -32,9 +32,7 @@
#include <optional>
#include <vector>
namespace openspace {
struct CameraPose;
} // namespace openspace
namespace openspace { struct CameraPose; }
namespace openspace::interaction {

View File

@@ -27,6 +27,8 @@
#include <openspace/navigation/pathcurve.h>
#include <vector>
namespace openspace { class SceneGraphNode; }
namespace openspace::interaction {

View File

@@ -33,7 +33,6 @@
#include <openspace/properties/scalar/boolproperty.h>
#include <openspace/properties/scalar/doubleproperty.h>
#include <openspace/properties/scalar/floatproperty.h>
#include <ghoul/glm.h>
#include <memory>
namespace openspace {

View File

@@ -32,7 +32,7 @@
namespace openspace {
class ParallelConnection {
class ParallelConnection {
public:
enum class Status : uint32_t {
Disconnected = 0,

View File

@@ -27,7 +27,6 @@
#include <openspace/properties/propertyowner.h>
#include <openspace/network/messagestructures.h>
#include <openspace/network/parallelconnection.h>
#include <openspace/properties/misc/stringproperty.h>
#include <openspace/properties/scalar/floatproperty.h>

View File

@@ -26,7 +26,9 @@
#define __OPENSPACE_CORE___STRINGLISTPROPERTY___H__
#include <openspace/properties/misc/listproperty.h>
#include <string>
#include <vector>
namespace openspace::properties {

View File

@@ -26,6 +26,7 @@
#define __OPENSPACE_CORE___LISTPROPERTY___H__
#include <openspace/properties/templateproperty.h>
#include <vector>
namespace openspace::properties {

View File

@@ -28,6 +28,7 @@
#include <openspace/properties/templateproperty.h>
#include <set>
#include <string>
#include <vector>
namespace openspace::properties {

View File

@@ -29,11 +29,9 @@
#include <openspace/rendering/deferredcasterlistener.h>
#include <ghoul/glm.h>
#include <ghoul/misc/dictionary.h>
#include <ghoul/opengl/ghoul_gl.h>
#include <ghoul/opengl/uniformcache.h>
#include <map>
#include <string>
#include <vector>
namespace ghoul { class Dictionary; }

View File

@@ -28,9 +28,6 @@
#include <openspace/util/screenlog.h>
#include <ghoul/glm.h>
#include <ghoul/misc/boolean.h>
#include <ghoul/opengl/ghoul_gl.h>
#include <ghoul/opengl/uniformcache.h>
#include <atomic>
#include <memory>
#include <mutex>
#include <random>

View File

@@ -32,8 +32,6 @@
#include <openspace/properties/scalar/intproperty.h>
#include <openspace/properties/vector/vec4property.h>
#include <openspace/util/keys.h>
#include <ghoul/opengl/ghoul_gl.h>
#include <ghoul/opengl/uniformcache.h>
#include <map>
#include <memory>
#include <string>

View File

@@ -30,8 +30,6 @@
#include <openspace/properties/misc/stringproperty.h>
#include <openspace/properties/scalar/boolproperty.h>
#include <openspace/properties/scalar/doubleproperty.h>
#include <openspace/properties/scalar/floatproperty.h>
#include <openspace/scene/scenegraphnode.h>
#include <ghoul/misc/managedmemoryuniqueptr.h>
#include <string_view>

View File

@@ -28,8 +28,6 @@
#include <openspace/properties/propertyowner.h>
#include <openspace/properties/list/intlistproperty.h>
#include <openspace/properties/misc/optionproperty.h>
#include <openspace/properties/misc/triggerproperty.h>
#include <openspace/properties/scalar/boolproperty.h>
#include <openspace/properties/scalar/intproperty.h>
#include <openspace/properties/scalar/floatproperty.h>
@@ -40,14 +38,14 @@
#include <filesystem>
namespace ghoul {
namespace fontrendering { class Font; }
namespace opengl {
class ProgramObject;
class OpenGLStateCache;
} // namespace opengl
namespace fontrendering { class Font; }
namespace opengl {
class ProgramObject;
class OpenGLStateCache;
} // namespace opengl
class Dictionary;
class SharedMemory;
class Dictionary;
class SharedMemory;
} // ghoul
namespace openspace {

View File

@@ -33,7 +33,6 @@
#include <openspace/properties/scalar/floatproperty.h>
#include <openspace/properties/vector/vec3property.h>
#include <openspace/properties/vector/vec4property.h>
#include <ghoul/opengl/ghoul_gl.h>
#include <ghoul/opengl/uniformcache.h>
#include <memory>

View File

@@ -31,12 +31,17 @@
#include <openspace/properties/scalar/floatproperty.h>
#include <ghoul/font/fontrenderer.h>
namespace ghoul { class Dictionary; }
namespace ghoul::opengl {
namespace ghoul {
class Dictionary;
namespace fontrendering { class Font; }
namespace opengl {
class FramebufferObject;
class Texture;
} // namespace ghoul::opengl
namespace ghoul::fontrendering { class Font; }
} // namespace opengl
} // namespace ghoul
namespace openspace {

View File

@@ -29,7 +29,7 @@
#include <filesystem>
namespace ghoul::filesystem { class File; }
namespace ghoul::opengl {class Texture; }
namespace ghoul::opengl { class Texture; }
namespace openspace {

View File

@@ -29,7 +29,6 @@
#include <filesystem>
#include <functional>
#include <memory>
#include <string>
namespace ghoul::filesystem { class File; }
namespace ghoul::opengl { class Texture; }
@@ -57,7 +56,6 @@ public:
private:
void setTextureFromImage();
void uploadTexture();
std::filesystem::path _filepath;
std::unique_ptr<ghoul::filesystem::File> _file;

View File

@@ -27,8 +27,6 @@
#include <ghoul/glm.h>
#include <filesystem>
#include <string>
#include <vector>
namespace ghoul::opengl {
class Texture;

View File

@@ -25,7 +25,6 @@
#ifndef __OPENSPACE_CORE___PROFILE___H__
#define __OPENSPACE_CORE___PROFILE___H__
#include <openspace/engine/globals.h>
#include <openspace/properties/propertyowner.h>
#include <openspace/util/keys.h>
#include <ghoul/glm.h>

View File

@@ -29,7 +29,6 @@
#include <openspace/scene/scenegraphnode.h>
#include <ghoul/misc/easing.h>
#include <ghoul/misc/memorypool.h>
#include <mutex>
#include <set>
#include <unordered_map>

View File

@@ -39,11 +39,10 @@
#include <atomic>
#include <chrono>
#include <functional>
#include <memory>
#include <optional>
#include <vector>
//#define Debugging_Core_SceneGraphNode_Indices
// #define Debugging_Core_SceneGraphNode_Indices
namespace ghoul { class Dictionary; }
namespace ghoul::opengl { class ProgramObject; }

View File

@@ -30,7 +30,6 @@
#include <openspace/properties//scalar/boolproperty.h>
#include <ghoul/glm.h>
#include <ghoul/misc/managedmemoryuniqueptr.h>
#include <memory>
namespace ghoul { class Dictionary; }

View File

@@ -31,7 +31,6 @@
#include <ghoul/misc/boolean.h>
#include <filesystem>
#include <mutex>
#include <optional>
#include <queue>
#include <functional>

View File

@@ -50,7 +50,7 @@ bool lineSphereIntersection(const glm::dvec3& p1, const glm::dvec3& p2,
/**
* Check if the point \p p is inside of the sphere defined by radius \p r and center
* point \p c
* point \p c.
*/
bool isPointInsideSphere(const glm::dvec3& p, const glm::dvec3& c, double r);

View File

@@ -27,7 +27,7 @@
#include <openspace/util/concurrentqueue.h>
#include <openspace/util/threadpool.h>
#include <memory>
#include <mutex>
namespace openspace {
@@ -38,7 +38,7 @@ template <typename T> struct Job;
* Templated Concurrent Job Manager
* This class is used execute specific jobs on one (1) parallel thread
*/
template<typename P>
template <typename P>
class ConcurrentJobManager {
public:
explicit ConcurrentJobManager(ThreadPool pool);

View File

@@ -27,12 +27,12 @@
namespace openspace {
template<typename P>
template <typename P>
ConcurrentJobManager<P>::ConcurrentJobManager(ThreadPool pool)
: threadPool(pool)
{}
template<typename P>
template <typename P>
void ConcurrentJobManager<P>::enqueueJob(std::shared_ptr<Job<P>> job) {
threadPool.enqueue([this, job]() {
job->execute();
@@ -41,12 +41,12 @@ void ConcurrentJobManager<P>::enqueueJob(std::shared_ptr<Job<P>> job) {
});
}
template<typename P>
template <typename P>
void ConcurrentJobManager<P>::clearEnqueuedJobs() {
threadPool.clearTasks();
}
template<typename P>
template <typename P>
std::shared_ptr<Job<P>> ConcurrentJobManager<P>::popFinishedJob() {
ghoul_assert(!_finishedJobs.empty(), "There is no finished job to pop");
@@ -54,7 +54,7 @@ std::shared_ptr<Job<P>> ConcurrentJobManager<P>::popFinishedJob() {
return _finishedJobs.pop();
}
template<typename P>
template <typename P>
size_t ConcurrentJobManager<P>::numFinishedJobs() const {
return _finishedJobs.size();
}

View File

@@ -75,5 +75,4 @@ bool ConcurrentQueue<T>::empty() const {
return size() == 0;
}
} // namespace openspace

View File

@@ -28,7 +28,6 @@
#include <openspace/util/distanceconstants.h>
#include <ghoul/misc/assert.h>
#include <ghoul/misc/constexpr.h>
#include <algorithm>
#include <array>
#include <string>

View File

@@ -26,13 +26,9 @@
#define __OPENSPACE_CORE___DYNAMICFILESEQUENCEDOWNLOADER___H__
#include <openspace/util/httprequest.h>
#include <ghoul/logging/logmanager.h>
#include <filesystem>
#include <map>
#include <memory>
#include <queue>
#include <string>
#include <unordered_map>
#include <vector>
namespace openspace {

View File

@@ -26,7 +26,6 @@
#define __OPENSPACE_CORE___ELLIPSOID___H__
#include <ghoul/glm.h>
#include <vector>
namespace openspace {

View File

@@ -33,7 +33,6 @@ void FactoryManager::addFactory(std::string name) {
_factories.push_back({ std::move(f), std::move(name) });
}
template <class T>
ghoul::TemplateFactory<T>* FactoryManager::factory() const {
for (const FactoryInfo& f : _factories) {

View File

@@ -25,8 +25,6 @@
#ifndef __OPENSPACE_CORE___JOB___H__
#define __OPENSPACE_CORE___JOB___H__
#include <memory>
namespace openspace {
/**

View File

@@ -28,6 +28,7 @@
#include <openspace/json.h>
#include <ghoul/misc/dictionary.h>
#include <string>
#include <vector>
namespace openspace {
@@ -74,7 +75,7 @@ std::string formatJson(T value);
* \param json The JSON object to sort
* \param key The key the JSON should be sorted by
*/
void sortJson(nlohmann::json& json, const std::string& key);
void sortJson(nlohmann::json& json, std::string_view key);
/**
* Converts the provided JSON object into its corresponding Dictionary format. Please note

View File

@@ -22,7 +22,6 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <ghoul/format.h>
#include <ghoul/glm.h>
#include <ghoul/misc/dictionaryjsonformatter.h>
#include <type_traits>

View File

@@ -59,9 +59,8 @@
#include <ghoul/misc/stringconversion.h>
#include <array>
#include <map>
#include <cstdint>
#include <string>
#include <unordered_map>
namespace openspace {

View File

@@ -42,10 +42,10 @@ public:
void render() const;
void updateSize(const glm::vec2& size);
void updateSize(const float size);
void updateSize(float size);
private:
void updateGeometry();
void updateGeometry() const;
GLuint _vaoId = 0;
GLuint _vBufferId = 0;

View File

@@ -32,7 +32,7 @@ namespace openspace {
class Sphere {
public:
Sphere(float radius, int segments = 8);
explicit Sphere(float radius, int segments = 8);
Sphere(glm::vec3 radius, int segments);
Sphere(const Sphere& cpy);
~Sphere();

View File

@@ -27,7 +27,6 @@
#include <openspace/engine/globals.h>
#include <openspace/util/memorymanager.h>
#include <ghoul/format.h>
#include <ghoul/glm.h>
#include <ghoul/misc/assert.h>
#include <ghoul/misc/boolean.h>

View File

@@ -26,7 +26,6 @@
#define __OPENSPACE_CORE___SYNCBUFFER___H__
#include <ghoul/glm.h>
#include <memory>
#include <string>
#include <vector>

View File

@@ -23,7 +23,6 @@
****************************************************************************************/
#include <ghoul/misc/assert.h>
#include <ghoul/glm.h>
#include <cstring>
namespace openspace {

View File

@@ -42,7 +42,7 @@ namespace openspace {
*
* `((T&) t).method();`
*/
template<class T>
template <class T>
class SyncData : public Syncable {
public:
SyncData() = default;

View File

@@ -26,56 +26,56 @@
namespace openspace {
template<class T>
template <class T>
SyncData<T>::SyncData(const T& val) : _data(val) {}
template<class T>
template <class T>
SyncData<T>::SyncData(const SyncData<T>& o)
: _data(o._data)
, _doubleBufferedData(o._doubleBufferedData)
{}
template<class T>
template <class T>
SyncData<T>& SyncData<T>::operator=(const T& rhs) {
_data = rhs;
return *this;
}
template<class T>
template <class T>
SyncData<T>::operator T&() {
return _data;
}
template<class T>
template <class T>
SyncData<T>::operator const T&() const {
return _data;
}
template<class T>
template <class T>
T& SyncData<T>::data() {
return _data;
}
template<class T>
template <class T>
const T& SyncData<T>::data() const {
return _data;
}
template<class T>
template <class T>
void SyncData<T>::encode(SyncBuffer* syncBuffer) {
_mutex.lock();
syncBuffer->encode(_data);
_mutex.unlock();
}
template<class T>
template <class T>
void SyncData<T>::decode(SyncBuffer* syncBuffer) {
_mutex.lock();
syncBuffer->decode(_doubleBufferedData);
_mutex.unlock();
}
template<class T>
template <class T>
void SyncData<T>::postSync(bool isMaster) {
// apply synced update
if (!isMaster) {

View File

@@ -26,9 +26,9 @@
#define __OPENSPACE_CORE___THREAD_POOL___H__
#include <condition_variable>
#include <deque>
#include <functional>
#include <mutex>
#include <queue>
#include <thread>
#include <vector>

View File

@@ -28,7 +28,6 @@
#include <openspace/util/timeconstants.h>
#include <ghoul/misc/assert.h>
#include <ghoul/misc/constexpr.h>
#include <algorithm>
#include <array>
#include <string>

View File

@@ -25,9 +25,7 @@
#ifndef __OPENSPACE_CORE___TIMELINE___H__
#define __OPENSPACE_CORE___TIMELINE___H__
#include <algorithm>
#include <deque>
#include <cstddef>
namespace openspace {

View File

@@ -22,6 +22,8 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <algorithm>
namespace openspace {
template <typename T>

View File

@@ -27,7 +27,6 @@
#include <glm/vec2.hpp>
#include <cstdint>
#include <deque>
namespace openspace {

View File

@@ -36,6 +36,7 @@
#include <openspace/properties/vector/vec4property.h>
#include <openspace/rendering/transferfunction.h>
#include <openspace/util/dynamicfilesequencedownloader.h>
#include <deque>
#include <vector>
namespace openspace {

View File

@@ -43,14 +43,14 @@ namespace ghoul::opengl { class Texture; }
namespace openspace {
template<typename T>
template <typename T>
struct ImageData {
std::valarray<T> contents;
long int width;
long int height;
};
template<typename T>
template <typename T>
struct TableData {
std::unordered_map<std::string, std::vector<T>> contents;
int readRows;
@@ -63,13 +63,13 @@ public:
explicit FitsFileReader(bool verboseMode);
~FitsFileReader();
template<typename T>
template <typename T>
std::shared_ptr<ImageData<T>> readImage(const std::filesystem::path& path);
template<typename T>
template <typename T>
std::shared_ptr<std::unordered_map<std::string, T>> readHeader(
std::vector<std::string>& keywords);
template<typename T>
template <typename T>
std::shared_ptr<T> readHeaderValue(const std::string key);
/**
@@ -78,7 +78,7 @@ public:
* longer if it's a big file. If no HDU index is given the current Extension HDU will
* be read from.
*/
template<typename T>
template <typename T>
std::shared_ptr<TableData<T>> readTable(const std::filesystem::path& path,
const std::vector<std::string>& columnNames, int startRow = 1, int endRow = 10,
int hduIdx = 1, bool readAll = false);
@@ -105,10 +105,10 @@ private:
bool _verboseMode;
bool isPrimaryHDU();
template<typename T>
template <typename T>
std::shared_ptr<ImageData<T>> readImageInternal(CCfits::PHDU& image);
template<typename T>
template <typename T>
std::shared_ptr<ImageData<T>> readImageInternal(CCfits::ExtHDU& image);
mutable std::mutex _mutex;

View File

@@ -29,6 +29,7 @@
#include <openspace/properties/misc/optionproperty.h>
#include <openspace/util/dynamicfilesequencedownloader.h>
#include <deque>
namespace openspace {

View File

@@ -37,7 +37,7 @@ namespace CCfits {
namespace openspace {
template<typename T>
template <typename T>
struct ImageData {
std::valarray<T> contents;
int width;
@@ -67,7 +67,7 @@ void readFitsHeader(const std::filesystem::path& path);
*/
int nLayers(const std::filesystem::path& path);
template<typename T, typename U>
template <typename T, typename U>
std::shared_ptr<ImageData<T>> readImageInternal(U& image);
} // namespace openspace

View File

@@ -138,7 +138,7 @@ std::shared_ptr<T> FitsFileReader::readHeaderValue(const std::string key) {
return nullptr;
}
template<typename T>
template <typename T>
std::shared_ptr<TableData<T>> FitsFileReader::readTable(const std::filesystem::path& path,
const std::vector<std::string>& columnNames,
int startRow,
@@ -657,7 +657,7 @@ std::vector<float> FitsFileReader::readSpeckFile(const std::filesystem::path& fi
// This is pretty annoying, the read method is not derived from the HDU class
// in CCfits - need to explicitly cast to the sub classes to access read
template<typename T>
template <typename T>
std::shared_ptr<ImageData<T>> FitsFileReader::readImageInternal(ExtHDU& image) {
try {
std::valarray<T> contents;
@@ -675,7 +675,7 @@ std::shared_ptr<ImageData<T>> FitsFileReader::readImageInternal(ExtHDU& image) {
return nullptr;
}
template<typename T>
template <typename T>
std::shared_ptr<ImageData<T>> FitsFileReader::readImageInternal(PHDU& image) {
try {
std::valarray<T> contents;

View File

@@ -89,7 +89,7 @@ std::unique_ptr<ghoul::opengl::Texture> loadTextureFromFits(
// Create texture from imagedata
auto texture = std::make_unique<ghoul::opengl::Texture>(
imageData,
glm::size3_t(fitsValues->width, fitsValues->height, 1),
glm::uvec3(fitsValues->width, fitsValues->height, 1),
GL_TEXTURE_2D,
ghoul::opengl::Texture::Format::Red,
GL_RED,
@@ -140,7 +140,7 @@ int nLayers(const std::filesystem::path& path) {
}
}
template<typename T, typename U>
template <typename T, typename U>
std::shared_ptr<ImageData<T>> readImageInternal(U& image) {
try {
std::valarray<T> contents;

View File

@@ -27,24 +27,24 @@
namespace openspace::globebrowsing::cache {
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
LRUCache<KeyType, ValueType, HasherType>::LRUCache(size_t size)
: _maximumCacheSize(size)
{}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
void LRUCache<KeyType, ValueType, HasherType>::clear() {
_itemList.clear();
_itemMap.clear();
}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
void LRUCache<KeyType, ValueType, HasherType>::put(KeyType key, ValueType value) {
putWithoutCleaning(std::move(key), std::move(value));
clean();
}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
std::vector<std::pair<KeyType, ValueType>>
LRUCache<KeyType, ValueType, HasherType>::putAndFetchPopped(KeyType key, ValueType value)
{
@@ -52,12 +52,12 @@ LRUCache<KeyType, ValueType, HasherType>::putAndFetchPopped(KeyType key, ValueTy
return cleanAndFetchPopped();
}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
bool LRUCache<KeyType, ValueType, HasherType>::exist(const KeyType& key) const {
return (_itemMap.count(key) > 0);
}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
bool LRUCache<KeyType, ValueType, HasherType>::touch(const KeyType& key) {
ZoneScoped;
@@ -84,12 +84,12 @@ bool LRUCache<KeyType, ValueType, HasherType>::touch(const KeyType& key) {
}
}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
bool LRUCache<KeyType, ValueType, HasherType>::isEmpty() const {
return (_itemMap.size() == 0);
}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
ValueType LRUCache<KeyType, ValueType, HasherType>::get(const KeyType& key) {
const auto it = _itemMap.find(key);
// Move list iterator pointing to value
@@ -98,7 +98,7 @@ ValueType LRUCache<KeyType, ValueType, HasherType>::get(const KeyType& key) {
return res;
}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
std::pair<KeyType, ValueType> LRUCache<KeyType, ValueType, HasherType>::popMRU() {
ghoul_assert(!_itemList.empty(), "Cannot pop LRU cache. Ensure cache is not empty");
@@ -109,7 +109,7 @@ std::pair<KeyType, ValueType> LRUCache<KeyType, ValueType, HasherType>::popMRU()
return toReturn;
}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
std::pair<KeyType, ValueType> LRUCache<KeyType, ValueType, HasherType>::popLRU() {
ghoul_assert(!_itemList.empty(), "Cannot pop LRU cache. Ensure cache is not empty");
@@ -121,17 +121,17 @@ std::pair<KeyType, ValueType> LRUCache<KeyType, ValueType, HasherType>::popLRU()
return toReturn;
}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
size_t LRUCache<KeyType, ValueType, HasherType>::size() const {
return _itemMap.size();
}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
size_t LRUCache<KeyType, ValueType, HasherType>::maximumCacheSize() const {
return _maximumCacheSize;
}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
void LRUCache<KeyType, ValueType, HasherType>::putWithoutCleaning(KeyType key,
ValueType value)
{
@@ -144,7 +144,7 @@ void LRUCache<KeyType, ValueType, HasherType>::putWithoutCleaning(KeyType key,
_itemMap.emplace(std::move(key), _itemList.begin());
}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
void LRUCache<KeyType, ValueType, HasherType>::clean() {
while (_itemMap.size() > _maximumCacheSize) {
auto lastIt = _itemList.end();
@@ -154,7 +154,7 @@ void LRUCache<KeyType, ValueType, HasherType>::clean() {
}
}
template<typename KeyType, typename ValueType, typename HasherType>
template <typename KeyType, typename ValueType, typename HasherType>
std::vector<std::pair<KeyType, ValueType>>
LRUCache<KeyType, ValueType, HasherType>::cleanAndFetchPopped()
{

Some files were not shown because too many files have changed in this diff Show More