Cleanup for coding style

Add strict mode to check_style_guide script
This commit is contained in:
Alexander Bock
2017-11-08 10:35:39 -06:00
parent d94408224c
commit b50b52d351
387 changed files with 1907 additions and 2132 deletions

View File

@@ -168,7 +168,7 @@ public:
* \throw ghoul::RuntimeError If the configuration could not be found
*/
static std::string findConfiguration(const std::string& filename);
/**
* Load the provided configuration file (\p filename) into this Dictionary. All paths
* that are specified in the configuration file will automatically be registered in

View File

@@ -57,7 +57,7 @@ public:
* name
*/
void initialize();
/**
* Deinitializes all of the contained OpenSpaceModule%s by calling the
* OpenSpaceModule::deinitialize methods.
@@ -73,14 +73,14 @@ public:
* \pre \p module must not be nullptr
*/
void registerModule(std::unique_ptr<OpenSpaceModule> module);
/**
* Returns a list of all registered OpenSpaceModule%s that have been registered with
* this ModuleEngine. All returned OpenSpaceModule%s are guaranteed to be initialized.
* \return A list of all registered OpenSpaceModule%s
*/
std::vector<OpenSpaceModule*> modules() const;
/**
* Get the module subclass with given template argument. Requires the module subclass
* to have the public static member variable <code>name</code> which must be equal to

View File

@@ -98,10 +98,10 @@ public:
void decode();
void scheduleLoadScene(std::string scenePath);
void writeDocumentation();
void toggleShutdownMode();
void runPostInitializationScripts(const std::string& sceneDescription);
// Guaranteed to return a valid pointer
@@ -123,7 +123,7 @@ public:
scripting::ScriptScheduler& scriptScheduler();
VirtualPropertyManager& virtualPropertyManager();
// This method is only to be called from Modules
enum class CallbackOption {
Initialize = 0, // Callback for the end of the initialization
@@ -135,14 +135,14 @@ public:
Render, // Callback for the end of the render function
PostDraw // Callback for the end of the post-draw function
};
// Registers a callback for a specific CallbackOption
void registerModuleCallback(CallbackOption option, std::function<void()> function);
// Registers a callback that is called when a new keyboard event is received
void registerModuleKeyboardCallback(
std::function<bool (Key, KeyModifier, KeyAction)> function);
// Registers a callback that is called when a new character event is received
void registerModuleCharCallback(
std::function<bool (unsigned int, KeyModifier)> function);
@@ -150,16 +150,16 @@ public:
// Registers a callback that is called when a new mouse button is received
void registerModuleMouseButtonCallback(
std::function<bool (MouseButton, MouseAction)> function);
// Registers a callback that is called when a new mouse movement is received
void registerModuleMousePositionCallback(
std::function<void (double, double)> function);
// Registers a callback that is called when a scroll wheel change is received
void registerModuleMouseScrollWheelCallback(
std::function<bool (double, double)> function
);
/**
* Returns the Lua library that contains all Lua functions available to affect the
* application.
@@ -175,7 +175,7 @@ private:
void loadFonts();
void runPreInitializationScripts(const std::string& sceneDescription);
void configureLogging();
// Components
std::unique_ptr<ConfigurationManager> _configurationManager;
std::unique_ptr<SceneManager> _sceneManager;
@@ -204,30 +204,30 @@ private:
properties::StringProperty versionString;
properties::StringProperty sourceControlInformation;
} _versionInformation;
bool _scheduledSceneSwitch;
std::string _scenePath;
struct {
std::vector<std::function<void()>> initialize;
std::vector<std::function<void()>> deinitialize;
std::vector<std::function<void()>> initializeGL;
std::vector<std::function<void()>> deinitializeGL;
std::vector<std::function<void()>> preSync;
std::vector<std::function<void()>> postSyncPreDraw;
std::vector<std::function<void()>> render;
std::vector<std::function<void()>> postDraw;
std::vector<std::function<bool (Key, KeyModifier, KeyAction)>> keyboard;
std::vector<std::function<bool (unsigned int, KeyModifier)>> character;
std::vector<std::function<bool (MouseButton, MouseAction)>> mouseButton;
std::vector<std::function<void (double, double)>> mousePosition;
std::vector<std::function<bool (double, double)>> mouseScrollWheel;
} _moduleCallbacks;
// Structure that is responsible for the delayed shutdown of the application
struct {
// Whether the application is currently in shutdown mode (i.e. counting down the

View File

@@ -34,7 +34,7 @@
#include <vector>
namespace openspace {
class OpenSpaceModule;
class SettingsEngine : public properties::PropertyOwner {
@@ -42,7 +42,7 @@ public:
SettingsEngine();
void initialize();
void setModules(const std::vector<OpenSpaceModule*>& modules);
private:

View File

@@ -71,7 +71,7 @@ public:
* Invokes the postsync method of all added Syncables
*/
void postSynchronization(IsMaster isMaster);
/**
* Add a Syncable to be synchronized over the SGCT cluster.
* \pre syncable must not be nullptr

View File

@@ -64,14 +64,14 @@ public:
bool isMaster() const override;
bool isUsingSwapGroups() const override;
bool isSwapGroupMaster() const override;
glm::mat4 viewProjectionMatrix() const override;
glm::mat4 modelMatrix() const override;
void setNearFarClippingPlane(float near, float far) override;
void setEyeSeparationDistance(float distance) override;
glm::ivec4 viewportPixelCoordinates() const override;
bool isExternalControlConnected() const override;
void sendMessageToExternalControl(const std::vector<char>& message) const override;

View File

@@ -76,7 +76,7 @@ public:
* disables it
*/
virtual void setSynchronization(bool enabled);
/**
* This method clears all the rendering windows with the specified \p clearColor. In
* most OpenGL cases, this will end up with one or mode <code>glClear</code> calls.
@@ -84,7 +84,7 @@ public:
* \param clearColor The color with which to clear all windows
*/
virtual void clearAllWindows(const glm::vec4& clearColor);
/**
* Returns whether the current window has been resized recently. On default, this
* method always returns <code>false</code>.
@@ -119,7 +119,7 @@ public:
* \return The location of the mouse cursor in pixel screen coordinates
*/
virtual glm::vec2 mousePosition() const;
/**
* Returns a bitmask of the status of all available mouse buttons. Bit <code>i</code>
* is <code>1</code> if mouse button <code>i</code> is pressed down;
@@ -129,28 +129,28 @@ public:
* \return A bitmask showing the status of all mouse buttons (up to \p maxNumber)
*/
virtual uint32_t mouseButtons(int maxNumber = 8) const;
/**
* Returns the size of the currently active window in pixel coordinates. On default,
* this method returns a window size of <code>0,0</code>.
* \return The size of the currently active window in pixel coordinates
*/
virtual glm::ivec2 currentWindowSize() const;
/**
* Returns the resolution of the currently active window in pixel coordinates. On
* default, this method returns the same size as #currentWindowSize.
* \return The resolution of the currently active window in pixel coordinates
*/
virtual glm::ivec2 currentWindowResolution() const;
/**
* Returns the resolution of the currently active framebuffer in pixel coordinates.
* On default, this method returns the same size as #currentWindowSize.
* \return The resolution of the currently active window in pixel coordinates
*/
virtual glm::ivec2 currentDrawBufferResolution() const;
/**
* Returns the DPI scaling factor for the current window. This is normally 1 on all
* regular monitors and 2 on Retina screens.
@@ -187,7 +187,7 @@ public:
* \return Whether the current rendering window is GUI-only
*/
virtual bool isGuiWindow() const;
/**
* Returns <code>true</code> if this application is the master for a clustered
* environment.
@@ -218,7 +218,7 @@ public:
* \return The currently employed model matrix
*/
virtual glm::mat4 modelMatrix() const;
/**
* Sets the near and far clipping planes of the rendering window. This method defaults
* to a no-op.
@@ -226,7 +226,7 @@ public:
* \param far The far clipping plane
*/
virtual void setNearFarClippingPlane(float near, float far);
/**
* Sets the stereo eye separation distance for the render engine.
* \param distance The distance between eyes for stereo rendering.
@@ -241,7 +241,7 @@ public:
* \return The location and size of the current viewport
*/
virtual glm::ivec4 viewportPixelCoordinates() const;
/**
* Returns <code>true</code> if there is an external control connected, i.e., an
* application that can receive control commands. On default, this method will return
@@ -249,13 +249,13 @@ public:
* \return If there is an external control connected
*/
virtual bool isExternalControlConnected() const;
/**
* Sends a \p message to an external control. This method defaults to a no-op.
* \param message The message to be sent
*/
virtual void sendMessageToExternalControl(const std::vector<char>& message) const;
/**
* Returns <code>true</code> if the rendering is a single viewport with an single
* window; <code>false</code> otherwise. On default, this method returns