diff options
author | Timo Lotterbach <timo.lotterbach@bmw-carit.de> | 2013-03-01 01:42:46 -0800 |
---|---|---|
committer | Timo Lotterbach <timo.lotterbach@bmw-carit.de> | 2013-03-14 05:03:39 -0700 |
commit | f78a64a5c3bfb4b6531aaeea4a56c362aacf27f5 (patch) | |
tree | 044fb038f9962b68f0bcd64c80994904f33090c5 /LayerManagerCommands | |
parent | ec93f4680936a602096a1e12f8f963e7c399c3e4 (diff) | |
download | layer_management-f78a64a5c3bfb4b6531aaeea4a56c362aacf27f5.tar.gz |
LayerManagement: fixed warnings detected by style guide check scripts
Signed-off-by: Timo Lotterbach <timo.lotterbach@bmw-carit.de>
Diffstat (limited to 'LayerManagerCommands')
43 files changed, 182 insertions, 170 deletions
diff --git a/LayerManagerCommands/include/CommitCommand.h b/LayerManagerCommands/include/CommitCommand.h index 9188210..68f1f14 100644 --- a/LayerManagerCommands/include/CommitCommand.h +++ b/LayerManagerCommands/include/CommitCommand.h @@ -34,7 +34,7 @@ public: : ICommand(ExecuteSynchronous, sender) {} - /** + /** * \brief default destructor */ virtual ~CommitCommand() {} diff --git a/LayerManagerCommands/include/ExitCommand.h b/LayerManagerCommands/include/ExitCommand.h index 1223b8c..9a9592d 100644 --- a/LayerManagerCommands/include/ExitCommand.h +++ b/LayerManagerCommands/include/ExitCommand.h @@ -22,7 +22,7 @@ #include "ICommand.h" -class ExitCommand: public ICommand +class ExitCommand : public ICommand { public: @@ -36,7 +36,7 @@ public: : ICommand(ExecuteSynchronous, sender) {} - /** + /** * \brief default destructor */ virtual ~ExitCommand() {} diff --git a/LayerManagerCommands/include/GetOptimizationModeCommand.h b/LayerManagerCommands/include/GetOptimizationModeCommand.h index 96cbeda..e1d777d 100644 --- a/LayerManagerCommands/include/GetOptimizationModeCommand.h +++ b/LayerManagerCommands/include/GetOptimizationModeCommand.h @@ -35,7 +35,7 @@ public: * \param[in] returnMode location to store mode of optimization on execution * \ingroup Commands */ - GetOptimizationModeCommand(pid_t sender,OptimizationType id, OptimizationModeType* returnMode) + GetOptimizationModeCommand(pid_t sender, OptimizationType id, OptimizationModeType* returnMode) : ICommand(ExecuteSynchronous, sender) , m_id(id) , m_pReturnMode(returnMode) diff --git a/LayerManagerCommands/include/LayerDumpCommand.h b/LayerManagerCommands/include/LayerDumpCommand.h index 788a07c..c9fcea6 100644 --- a/LayerManagerCommands/include/LayerDumpCommand.h +++ b/LayerManagerCommands/include/LayerDumpCommand.h @@ -23,7 +23,7 @@ #include "ICommand.h" #include <string> -class LayerDumpCommand: public ICommand +class LayerDumpCommand : public ICommand { public: /*! diff --git a/LayerManagerCommands/include/LayerGetDimensionCommand.h b/LayerManagerCommands/include/LayerGetDimensionCommand.h index 0385301..873838f 100644 --- a/LayerManagerCommands/include/LayerGetDimensionCommand.h +++ b/LayerManagerCommands/include/LayerGetDimensionCommand.h @@ -22,7 +22,7 @@ #include "ICommand.h" -class LayerGetDimensionCommand: public ICommand +class LayerGetDimensionCommand : public ICommand { public: /*! diff --git a/LayerManagerCommands/include/LayerGetOrientationCommand.h b/LayerManagerCommands/include/LayerGetOrientationCommand.h index ac597a5..58a78f9 100644 --- a/LayerManagerCommands/include/LayerGetOrientationCommand.h +++ b/LayerManagerCommands/include/LayerGetOrientationCommand.h @@ -23,7 +23,7 @@ #include "ICommand.h" #include "OrientationType.h" -class LayerGetOrientationCommand: public ICommand +class LayerGetOrientationCommand : public ICommand { public: /*! diff --git a/LayerManagerCommands/include/LayerSetDestinationRectangleCommand.h b/LayerManagerCommands/include/LayerSetDestinationRectangleCommand.h index 889a88d..57f74f1 100644 --- a/LayerManagerCommands/include/LayerSetDestinationRectangleCommand.h +++ b/LayerManagerCommands/include/LayerSetDestinationRectangleCommand.h @@ -74,7 +74,8 @@ private: const unsigned int m_height; // for unit testing - template <typename id_type, typename x_type, typename y_type, typename width_type, typename height_type> friend class LayerSetDestinationRectangleCommandEqMatcherP5; + template <typename id_type, typename x_type, typename y_type, typename width_type, typename height_type> + friend class LayerSetDestinationRectangleCommandEqMatcherP5; }; diff --git a/LayerManagerCommands/include/LayerSetPositionCommand.h b/LayerManagerCommands/include/LayerSetPositionCommand.h index d280a4a..40ddb13 100644 --- a/LayerManagerCommands/include/LayerSetPositionCommand.h +++ b/LayerManagerCommands/include/LayerSetPositionCommand.h @@ -41,7 +41,6 @@ public: , m_y(y) {} - /** * \brief default destructor */ diff --git a/LayerManagerCommands/include/LayerSetSourceRectangleCommand.h b/LayerManagerCommands/include/LayerSetSourceRectangleCommand.h index 5ad2053..f695f63 100644 --- a/LayerManagerCommands/include/LayerSetSourceRectangleCommand.h +++ b/LayerManagerCommands/include/LayerSetSourceRectangleCommand.h @@ -74,7 +74,8 @@ private: const unsigned int m_height; // for unit testing - template <typename id_type, typename x_type, typename y_type, typename width_type, typename height_type> friend class LayerSetSourceRectangleCommandEqMatcherP5; + template <typename id_type, typename x_type, typename y_type, typename width_type, typename height_type> + friend class LayerSetSourceRectangleCommandEqMatcherP5; }; diff --git a/LayerManagerCommands/include/ScreenDumpCommand.h b/LayerManagerCommands/include/ScreenDumpCommand.h index 95eebaa..e8c4dd8 100644 --- a/LayerManagerCommands/include/ScreenDumpCommand.h +++ b/LayerManagerCommands/include/ScreenDumpCommand.h @@ -23,7 +23,7 @@ #include "ICommand.h" #include <string> -class ScreenDumpCommand: public ICommand +class ScreenDumpCommand : public ICommand { public: /*! diff --git a/LayerManagerCommands/include/ScreenSetRenderOrderCommand.h b/LayerManagerCommands/include/ScreenSetRenderOrderCommand.h index 645f6d2..c7e793f 100644 --- a/LayerManagerCommands/include/ScreenSetRenderOrderCommand.h +++ b/LayerManagerCommands/include/ScreenSetRenderOrderCommand.h @@ -23,7 +23,7 @@ #include "ICommand.h" -class ScreenSetRenderOrderCommand: public ICommand +class ScreenSetRenderOrderCommand : public ICommand { public: /*! diff --git a/LayerManagerCommands/include/SurfaceDumpCommand.h b/LayerManagerCommands/include/SurfaceDumpCommand.h index f476bb7..16d5ee0 100644 --- a/LayerManagerCommands/include/SurfaceDumpCommand.h +++ b/LayerManagerCommands/include/SurfaceDumpCommand.h @@ -23,7 +23,7 @@ #include "ICommand.h" #include <string> -class SurfaceDumpCommand: public ICommand +class SurfaceDumpCommand : public ICommand { public: /*! diff --git a/LayerManagerCommands/include/SurfaceGetDimensionCommand.h b/LayerManagerCommands/include/SurfaceGetDimensionCommand.h index 8ef5a05..08f4c96 100644 --- a/LayerManagerCommands/include/SurfaceGetDimensionCommand.h +++ b/LayerManagerCommands/include/SurfaceGetDimensionCommand.h @@ -22,7 +22,7 @@ #include "ICommand.h" -class SurfaceGetDimensionCommand: public ICommand +class SurfaceGetDimensionCommand : public ICommand { public: /*! diff --git a/LayerManagerCommands/include/SurfaceGetKeyboardFocusCommand.h b/LayerManagerCommands/include/SurfaceGetKeyboardFocusCommand.h index 69b1bb6..a73aa73 100644 --- a/LayerManagerCommands/include/SurfaceGetKeyboardFocusCommand.h +++ b/LayerManagerCommands/include/SurfaceGetKeyboardFocusCommand.h @@ -59,7 +59,6 @@ public: private: unsigned int* m_pSurfId; - // for unit testing friend class GetKeyboardFocusSurfaceIdCommandEqMatcher; }; diff --git a/LayerManagerCommands/include/SurfaceGetOrientationCommand.h b/LayerManagerCommands/include/SurfaceGetOrientationCommand.h index f8de6db..5506cb3 100644 --- a/LayerManagerCommands/include/SurfaceGetOrientationCommand.h +++ b/LayerManagerCommands/include/SurfaceGetOrientationCommand.h @@ -23,7 +23,7 @@ #include "ICommand.h" #include "OrientationType.h" -class SurfaceGetOrientationCommand: public ICommand +class SurfaceGetOrientationCommand : public ICommand { public: /*! diff --git a/LayerManagerCommands/include/SurfaceRemoveNativeContentCommand.h b/LayerManagerCommands/include/SurfaceRemoveNativeContentCommand.h index 43df083..f18f1c5 100644 --- a/LayerManagerCommands/include/SurfaceRemoveNativeContentCommand.h +++ b/LayerManagerCommands/include/SurfaceRemoveNativeContentCommand.h @@ -66,7 +66,8 @@ private: uint m_surfaceId; // for unit testing - //template <typename nativeHandle_type, typename pixelformat_type, typename OriginalWidth_type, typename OriginalHeight_type> friend class SurfaceSetRenderBufferCommandEqMatcherP4; + //template <typename nativeHandle_type, typename pixelformat_type, typename OriginalWidth_type, typename OriginalHeight_type> + //friend class SurfaceSetRenderBufferCommandEqMatcherP4; }; diff --git a/LayerManagerCommands/include/SurfaceSetDestinationRectangleCommand.h b/LayerManagerCommands/include/SurfaceSetDestinationRectangleCommand.h index ff54810..041a994 100644 --- a/LayerManagerCommands/include/SurfaceSetDestinationRectangleCommand.h +++ b/LayerManagerCommands/include/SurfaceSetDestinationRectangleCommand.h @@ -74,7 +74,8 @@ private: const unsigned int m_height; // for unit testing - template <typename id_type, typename x_type, typename y_type, typename width_type, typename height_type> friend class SurfaceSetDestinationRectangleCommandEqMatcherP5; + template <typename id_type, typename x_type, typename y_type, typename width_type, typename height_type> + friend class SurfaceSetDestinationRectangleCommandEqMatcherP5; }; diff --git a/LayerManagerCommands/include/SurfaceSetDimensionCommand.h b/LayerManagerCommands/include/SurfaceSetDimensionCommand.h index af0519a..d51825f 100644 --- a/LayerManagerCommands/include/SurfaceSetDimensionCommand.h +++ b/LayerManagerCommands/include/SurfaceSetDimensionCommand.h @@ -34,7 +34,7 @@ public: * \param[in] height height of surface * \ingroup Commands */ - SurfaceSetDimensionCommand(pid_t sender, int id, unsigned int width,unsigned int height) + SurfaceSetDimensionCommand(pid_t sender, int id, unsigned int width, unsigned int height) : ICommand(ExecuteAsynchronous, sender) , m_id(id) , m_width(width) diff --git a/LayerManagerCommands/include/SurfaceSetKeyboardFocusCommand.h b/LayerManagerCommands/include/SurfaceSetKeyboardFocusCommand.h index ba45cbd..cceb278 100644 --- a/LayerManagerCommands/include/SurfaceSetKeyboardFocusCommand.h +++ b/LayerManagerCommands/include/SurfaceSetKeyboardFocusCommand.h @@ -26,41 +26,40 @@ class SurfaceSetKeyboardFocusCommand : public ICommand { - public: - /*! - * \action This command sets the keyboard focus on a particular surface - * \frequency Called whenever a surface needs to receive keyboard events - * \param[in] sender process id of application that sent this command - * \param[in] surfId id of surface - * \ingroup Commands - */ - SurfaceSetKeyboardFocusCommand(pid_t sender, unsigned int surfId) - : ICommand(ExecuteSynchronous, sender) - , m_surfId(surfId) - {} +public: + /*! + * \action This command sets the keyboard focus on a particular surface + * \frequency Called whenever a surface needs to receive keyboard events + * \param[in] sender process id of application that sent this command + * \param[in] surfId id of surface + * \ingroup Commands + */ + SurfaceSetKeyboardFocusCommand(pid_t sender, unsigned int surfId) + : ICommand(ExecuteSynchronous, sender) + , m_surfId(surfId) + {} - /** - * \brief default destructor - */ - virtual ~SurfaceSetKeyboardFocusCommand() {} + /** + * \brief default destructor + */ + virtual ~SurfaceSetKeyboardFocusCommand() {} - /** - * \brief Execute this command. - * \param[in] executor Pointer to instance executing the LayerManagement Commands - * \return ExecutionSuccess: execution successful - * \return ExecutionFailed: execution failed - */ - virtual ExecutionResult execute(ICommandExecutor* executor); + /** + * \brief Execute this command. + * \param[in] executor Pointer to instance executing the LayerManagement Commands + * \return ExecutionSuccess: execution successful + * \return ExecutionFailed: execution failed + */ + virtual ExecutionResult execute(ICommandExecutor* executor); - /** - * \brief Get description string for this command. - * \return String object with description of this command object - */ - virtual const std::string getString(); - - private: - const unsigned int m_surfId; + /** + * \brief Get description string for this command. + * \return String object with description of this command object + */ + virtual const std::string getString(); +private: + const unsigned int m_surfId; // for unit testing template <typename surfaceid_type> friend class SetKeyboardFocusOnCommandEqMatcherP; diff --git a/LayerManagerCommands/include/SurfaceSetNativeContentCommand.h b/LayerManagerCommands/include/SurfaceSetNativeContentCommand.h index 2daf401..9f1b6bc 100644 --- a/LayerManagerCommands/include/SurfaceSetNativeContentCommand.h +++ b/LayerManagerCommands/include/SurfaceSetNativeContentCommand.h @@ -40,7 +40,12 @@ public: * \param[in] OriginalHeight original height for native content * \ingroup Commands */ - SurfaceSetNativeContentCommand(pid_t sender, unsigned int surfaceId, unsigned int handle, PixelFormat pixelformat, uint OriginalWidth, uint OriginalHeight) + SurfaceSetNativeContentCommand(pid_t sender, + unsigned int surfaceId, + unsigned int handle, + PixelFormat pixelformat, + uint OriginalWidth, + uint OriginalHeight) : ICommand(ExecuteSynchronous, sender) , m_surfaceId(surfaceId) , m_nativeHandle(handle) @@ -78,7 +83,8 @@ private: uint m_originalHeight; // for unit testing - //template <typename nativeHandle_type, typename pixelformat_type, typename OriginalWidth_type, typename OriginalHeight_type> friend class SurfaceSetRenderBufferCommandEqMatcherP4; + //template <typename nativeHandle_type, typename pixelformat_type, typename OriginalWidth_type, + // typename OriginalHeight_type> friend class SurfaceSetRenderBufferCommandEqMatcherP4; }; diff --git a/LayerManagerCommands/include/SurfaceSetSourceRectangleCommand.h b/LayerManagerCommands/include/SurfaceSetSourceRectangleCommand.h index 8803dbf..ac4f1d2 100644 --- a/LayerManagerCommands/include/SurfaceSetSourceRectangleCommand.h +++ b/LayerManagerCommands/include/SurfaceSetSourceRectangleCommand.h @@ -76,7 +76,8 @@ private: const unsigned int m_height; // for unit testing - template <typename id_type, typename x_type, typename y_type, typename width_type, typename height_type> friend class SurfaceSetSourceRectangleCommandEqMatcherP5; + template <typename id_type, typename x_type, typename y_type, typename width_type, typename height_type> + friend class SurfaceSetSourceRectangleCommandEqMatcherP5; }; diff --git a/LayerManagerCommands/include/SurfaceUpdateInputEventAcceptance.h b/LayerManagerCommands/include/SurfaceUpdateInputEventAcceptance.h index ce6cc34..02a0508 100644 --- a/LayerManagerCommands/include/SurfaceUpdateInputEventAcceptance.h +++ b/LayerManagerCommands/include/SurfaceUpdateInputEventAcceptance.h @@ -28,59 +28,59 @@ class SurfaceUpdateInputEventAcceptance : public ICommand { - public: - /*! - * \action This command update the list of input devices the surface - * can accept events from. Call this method if you do not want a surface - * to receive particular type of event (touch, keyboard, ...) - * - * \frequency Preferably at init. This could lead to weird results - * if you update the acceptance at runtime, while the surface has already - * a focus (touch, keyboard, ...) - * - * \param[in] sender process id of application that sent this command - * \param[in] surfId id of surface - * \param[in] devices Bitmask of ilmInputDevice. To set the acceptance status of one or more input device. - * Note that this method will only the acceptance status for the specified InputDeviced in the - * "devices" parameter. Not specified input device status will remain unchanged. - * \param[in] accept if TRUE, input events from all specified devices will be accepted - * - * \ingroup Commands - */ - SurfaceUpdateInputEventAcceptance(pid_t sender, unsigned int surfId, InputDevice devices, bool accept) - : ICommand(ExecuteSynchronous, sender) - , m_surfId(surfId) - , m_devices(devices) - , m_accept(accept) - {} +public: + /*! + * \action This command update the list of input devices the surface + * can accept events from. Call this method if you do not want a surface + * to receive particular type of event (touch, keyboard, ...) + * + * \frequency Preferably at init. This could lead to weird results + * if you update the acceptance at runtime, while the surface has already + * a focus (touch, keyboard, ...) + * + * \param[in] sender process id of application that sent this command + * \param[in] surfId id of surface + * \param[in] devices Bitmask of ilmInputDevice. To set the acceptance status of one or more input device. + * Note that this method will only the acceptance status for the specified InputDeviced in the + * "devices" parameter. Not specified input device status will remain unchanged. + * \param[in] accept if TRUE, input events from all specified devices will be accepted + * + * \ingroup Commands + */ + SurfaceUpdateInputEventAcceptance(pid_t sender, unsigned int surfId, InputDevice devices, bool accept) + : ICommand(ExecuteSynchronous, sender) + , m_surfId(surfId) + , m_devices(devices) + , m_accept(accept) + {} - /** - * \brief default destructor - */ - virtual ~SurfaceUpdateInputEventAcceptance() {} + /** + * \brief default destructor + */ + virtual ~SurfaceUpdateInputEventAcceptance() {} - /** - * \brief Execute this command. - * \param[in] executor Pointer to instance executing the LayerManagement Commands - * \return ExecutionSuccess: execution successful - * \return ExecutionFailed: execution failed - */ - virtual ExecutionResult execute(ICommandExecutor* executor); + /** + * \brief Execute this command. + * \param[in] executor Pointer to instance executing the LayerManagement Commands + * \return ExecutionSuccess: execution successful + * \return ExecutionFailed: execution failed + */ + virtual ExecutionResult execute(ICommandExecutor* executor); - /** - * \brief Get description string for this command. - * \return String object with description of this command object - */ - virtual const std::string getString(); - - private: - const unsigned int m_surfId; - const InputDevice m_devices; - const bool m_accept; + /** + * \brief Get description string for this command. + * \return String object with description of this command object + */ + virtual const std::string getString(); +private: + const unsigned int m_surfId; + const InputDevice m_devices; + const bool m_accept; // for unit testing - template <typename surfaceid_type, typename devices_type, typename acceptance_type> friend class UpdateInputEventAcceptanceOnCommandEqMatcherP3; + template <typename surfaceid_type, typename devices_type, typename acceptance_type> + friend class UpdateInputEventAcceptanceOnCommandEqMatcherP3; }; #endif /* ! _SURFACEUPDATEINPUTEVENTACCEPTANCE_H_ */ diff --git a/LayerManagerCommands/src/LayerAddSurfaceCommand.cpp b/LayerManagerCommands/src/LayerAddSurfaceCommand.cpp index 8c39051..91f1eb1 100644 --- a/LayerManagerCommands/src/LayerAddSurfaceCommand.cpp +++ b/LayerManagerCommands/src/LayerAddSurfaceCommand.cpp @@ -34,17 +34,17 @@ ExecutionResult LayerAddSurfaceCommand::execute(ICommandExecutor* executor) { if (layer->addSurface(surface)) { - LOG_DEBUG("LayerAddSurfaceCommand","Adding surface(" << m_surfaceid << ")" << surface->getID() << " to layer(" << m_layerid << ") " << layer->getID()); + LOG_DEBUG("LayerAddSurfaceCommand", "Adding surface(" << m_surfaceid << ")" << surface->getID() << " to layer(" << m_layerid << ") " << layer->getID()); LOG_DEBUG("LayerAddSurfaceCommand", "Layer now has #surfaces:" << layer->getAllSurfaces().size()); result = surface->hasNativeContent() ? ExecutionSuccessRedraw : ExecutionSuccess; } else { unsigned int layer_id = surface->getContainingLayerId(); - LOG_WARNING("LayerAddSurfaceCommand","surface : id [ " << m_surfaceid << " ] already belongs to layer : id [ " << layer_id << " ]"); + LOG_WARNING("LayerAddSurfaceCommand", "surface : id [ " << m_surfaceid << " ] already belongs to layer : id [ " << layer_id << " ]"); result = (m_layerid == layer_id) ? ExecutionSuccess : ExecutionFailed; } - surface->calculateTargetDestination(layer->getSourceRegion(),layer->getDestinationRegion()); + surface->calculateTargetDestination(layer->getSourceRegion(), layer->getDestinationRegion()); } return result; diff --git a/LayerManagerCommands/src/LayerCreateCommand.cpp b/LayerManagerCommands/src/LayerCreateCommand.cpp index 0bf06fa..7422e06 100644 --- a/LayerManagerCommands/src/LayerCreateCommand.cpp +++ b/LayerManagerCommands/src/LayerCreateCommand.cpp @@ -26,18 +26,18 @@ ExecutionResult LayerCreateCommand::execute(ICommandExecutor* executor) Scene& scene = *(executor->getScene()); ExecutionResult result = ExecutionFailed; - Layer *layer = scene.createLayer(*m_idReturn, getSenderPid()); - if (layer) - { - *m_idReturn = layer->getID(); + Layer *layer = scene.createLayer(*m_idReturn, getSenderPid()); + if (layer) + { + *m_idReturn = layer->getID(); - layer->setDestinationRegion(Rectangle(0, 0, m_originalWidth, m_originalHeight)); - layer->setSourceRegion(Rectangle(0, 0, m_originalWidth, m_originalHeight)); - layer->OriginalSourceWidth = m_originalWidth; - layer->OriginalSourceHeight = m_originalHeight; + layer->setDestinationRegion(Rectangle(0, 0, m_originalWidth, m_originalHeight)); + layer->setSourceRegion(Rectangle(0, 0, m_originalWidth, m_originalHeight)); + layer->OriginalSourceWidth = m_originalWidth; + layer->OriginalSourceHeight = m_originalHeight; - LOG_DEBUG("LayerCreateCommand", "created layer with id: " << layer->getID() << "width: " << m_originalWidth << " height: " << m_originalHeight); - result = ExecutionSuccess; + LOG_DEBUG("LayerCreateCommand", "created layer with id: " << layer->getID() << "width: " << m_originalWidth << " height: " << m_originalHeight); + result = ExecutionSuccess; } return result; } diff --git a/LayerManagerCommands/src/LayerDumpCommand.cpp b/LayerManagerCommands/src/LayerDumpCommand.cpp index 2fb235a..069ead8 100644 --- a/LayerManagerCommands/src/LayerDumpCommand.cpp +++ b/LayerManagerCommands/src/LayerDumpCommand.cpp @@ -23,22 +23,22 @@ ExecutionResult LayerDumpCommand::execute(ICommandExecutor* executor) { - ExecutionResult result = ExecutionFailed; + ExecutionResult result = ExecutionFailed; Scene& scene = *(executor->getScene()); RendererList& m_rendererList = *(executor->getRendererList()); bool status = false; - LOG_INFO("LayerDumpCommand","making screenshot, output file: " << m_filename); + LOG_INFO("LayerDumpCommand", "making screenshot, output file: " << m_filename); - if (scene.getLayer(m_id)) - { - status = scene.isLayerInCurrentRenderOrder(m_id); - if (!status) - { - LOG_WARNING("LayerDumpCommand","Requested layer: " << m_id << " does not belong to the current render order"); - } - } + if (scene.getLayer(m_id)) + { + status = scene.isLayerInCurrentRenderOrder(m_id); + if (!status) + { + LOG_WARNING("LayerDumpCommand", "Requested layer: " << m_id << " does not belong to the current render order"); + } + } if (status) { diff --git a/LayerManagerCommands/src/LayerSetChromaKeyCommand.cpp b/LayerManagerCommands/src/LayerSetChromaKeyCommand.cpp index 9c8d6be..3072bb0 100644 --- a/LayerManagerCommands/src/LayerSetChromaKeyCommand.cpp +++ b/LayerManagerCommands/src/LayerSetChromaKeyCommand.cpp @@ -39,7 +39,7 @@ ExecutionResult LayerSetChromaKeyCommand::execute(ICommandExecutor* executor) { if (layer) { - LOG_DEBUG("LayerSetChromaKeyCommand","new chromakey disable for id: " << m_layerid); + LOG_DEBUG("LayerSetChromaKeyCommand", "new chromakey disable for id: " << m_layerid); result = layer->setChromaKeyEnabled(false) ? ExecutionSuccessRedraw : ExecutionSuccess; } } @@ -47,7 +47,7 @@ ExecutionResult LayerSetChromaKeyCommand::execute(ICommandExecutor* executor) { if (layer) { - LOG_DEBUG("LayerSetChromaKeyCommand","new chromakey (" + LOG_DEBUG("LayerSetChromaKeyCommand", "new chromakey (" << m_array[0] << ", " << m_array[1] << ", " << m_array[2] << ") for id: " << m_layerid); bool ansSetEnabled = layer->setChromaKeyEnabled(true); bool ansSetValues = layer->setChromaKey((unsigned char)m_array[0], (unsigned char)m_array[1], (unsigned char)m_array[2]); diff --git a/LayerManagerCommands/src/LayerSetOpacityCommand.cpp b/LayerManagerCommands/src/LayerSetOpacityCommand.cpp index 0b69525..f409e31 100644 --- a/LayerManagerCommands/src/LayerSetOpacityCommand.cpp +++ b/LayerManagerCommands/src/LayerSetOpacityCommand.cpp @@ -31,7 +31,7 @@ ExecutionResult LayerSetOpacityCommand::execute(ICommandExecutor* executor) if (layer) { - LOG_DEBUG("LayerSetOpacityCommand","new opacity " << m_opacity << " for id: " << m_id); + LOG_DEBUG("LayerSetOpacityCommand", "new opacity " << m_opacity << " for id: " << m_id); if (layer->setOpacity(m_opacity)) { result = ExecutionSuccessRedraw; diff --git a/LayerManagerCommands/src/LayerSetRenderOrderCommand.cpp b/LayerManagerCommands/src/LayerSetRenderOrderCommand.cpp index 8dff120..67bc027 100644 --- a/LayerManagerCommands/src/LayerSetRenderOrderCommand.cpp +++ b/LayerManagerCommands/src/LayerSetRenderOrderCommand.cpp @@ -47,12 +47,12 @@ ExecutionResult LayerSetRenderOrderCommand::execute(ICommandExecutor* executor) unsigned int layer_id = surface->getContainingLayerId(); if (layer->addSurface(surface)) { - LOG_DEBUG("LayerSetRenderOrderCommand","Adding surface " << surface->getID() << " to renderorder of layer " << m_layerid); + LOG_DEBUG("LayerSetRenderOrderCommand", "Adding surface " << surface->getID() << " to renderorder of layer " << m_layerid); result = ExecutionSuccessRedraw; } else { - LOG_WARNING("LayerSetRenderOrderCommand","surface : id [ " << m_array[surfaceIndex] << " ] already belongs to layer : id [ " << layer_id << " ]"); + LOG_WARNING("LayerSetRenderOrderCommand", "surface : id [ " << m_array[surfaceIndex] << " ] already belongs to layer : id [ " << layer_id << " ]"); } } } diff --git a/LayerManagerCommands/src/ScreenDumpCommand.cpp b/LayerManagerCommands/src/ScreenDumpCommand.cpp index 80f827a..659ab57 100644 --- a/LayerManagerCommands/src/ScreenDumpCommand.cpp +++ b/LayerManagerCommands/src/ScreenDumpCommand.cpp @@ -23,12 +23,12 @@ ExecutionResult ScreenDumpCommand::execute(ICommandExecutor* executor) { - ExecutionResult result = ExecutionFailed; + ExecutionResult result = ExecutionFailed; RendererList& m_rendererList = *(executor->getRendererList()); bool status = false; - LOG_INFO("ScreenDumpCommand","making screenshot, output file: " << m_filename); + LOG_INFO("ScreenDumpCommand", "making screenshot, output file: " << m_filename); status = (m_id == 0); diff --git a/LayerManagerCommands/src/ShaderCreateCommand.cpp b/LayerManagerCommands/src/ShaderCreateCommand.cpp index 7e86fec..a7f67a2 100644 --- a/LayerManagerCommands/src/ShaderCreateCommand.cpp +++ b/LayerManagerCommands/src/ShaderCreateCommand.cpp @@ -43,7 +43,7 @@ ExecutionResult ShaderCreateCommand::execute(ICommandExecutor* executor) { // insert shader to shader map int id = shader->getId(); - LOG_DEBUG("CreateShaderCommand","Shader with shader id : " << id << " successfully created"); + LOG_DEBUG("CreateShaderCommand", "Shader with shader id : " << id << " successfully created"); ShaderMap &shaderMap = scene.m_shaderMap; shaderMap[id] = shader; *m_returnID = id; diff --git a/LayerManagerCommands/src/ShaderSetUniformsCommand.cpp b/LayerManagerCommands/src/ShaderSetUniformsCommand.cpp index 1f9e577..2585749 100644 --- a/LayerManagerCommands/src/ShaderSetUniformsCommand.cpp +++ b/LayerManagerCommands/src/ShaderSetUniformsCommand.cpp @@ -43,7 +43,7 @@ ExecutionResult ShaderSetUniformsCommand::execute(ICommandExecutor* executor) const std::vector<std::string> uniformDesc = m_uniforms; std::vector<std::string>::const_iterator uiterator; - for (uiterator=uniformDesc.begin(); uiterator != uniformDesc.end(); ++uiterator) + for (uiterator = uniformDesc.begin(); uiterator != uniformDesc.end(); ++uiterator) { // parse description string and create uniform object ShaderUniform* uniform = ShaderUniform::createFromStringDescription(*uiterator); @@ -69,7 +69,7 @@ ExecutionResult ShaderSetUniformsCommand::execute(ICommandExecutor* executor) else { // shader not found - LOG_ERROR("ShaderSetUniformsCommand", "shader ID "<<m_shaderid<<" not found"); + LOG_ERROR("ShaderSetUniformsCommand", "shader ID " << m_shaderid << " not found"); result = ExecutionFailed; } diff --git a/LayerManagerCommands/src/SurfaceDumpCommand.cpp b/LayerManagerCommands/src/SurfaceDumpCommand.cpp index b582bf5..652b587 100644 --- a/LayerManagerCommands/src/SurfaceDumpCommand.cpp +++ b/LayerManagerCommands/src/SurfaceDumpCommand.cpp @@ -23,24 +23,24 @@ ExecutionResult SurfaceDumpCommand::execute(ICommandExecutor* executor) { - ExecutionResult result = ExecutionFailed; + ExecutionResult result = ExecutionFailed; Scene& scene = *(executor->getScene()); RendererList& m_rendererList = *(executor->getRendererList()); bool status = false; unsigned int layer_id = 0; - LOG_INFO("SurfaceDumpCommand","making screenshot, output file: " << m_filename); + LOG_INFO("SurfaceDumpCommand", "making screenshot, output file: " << m_filename); - if (scene.getSurface(m_id)) - { - layer_id = scene.getSurface(m_id)->getContainingLayerId(); - status = scene.isLayerInCurrentRenderOrder(layer_id); - if (!status) - { - LOG_WARNING("SurfaceDumpCommand","Requested surface: " << m_id << " does not belong to a layer which is part of the current render order"); - } - } + if (scene.getSurface(m_id)) + { + layer_id = scene.getSurface(m_id)->getContainingLayerId(); + status = scene.isLayerInCurrentRenderOrder(layer_id); + if (!status) + { + LOG_WARNING("SurfaceDumpCommand", "Requested surface: " << m_id << " does not belong to a layer which is part of the current render order"); + } + } if (status) { diff --git a/LayerManagerCommands/src/SurfaceGetOrientationCommand.cpp b/LayerManagerCommands/src/SurfaceGetOrientationCommand.cpp index 3224b4c..4f53412 100644 --- a/LayerManagerCommands/src/SurfaceGetOrientationCommand.cpp +++ b/LayerManagerCommands/src/SurfaceGetOrientationCommand.cpp @@ -35,7 +35,7 @@ ExecutionResult SurfaceGetOrientationCommand::execute(ICommandExecutor* executor result = ExecutionSuccess; } - return result; + return result; } const std::string SurfaceGetOrientationCommand::getString() diff --git a/LayerManagerCommands/src/SurfaceGetPixelformatCommand.cpp b/LayerManagerCommands/src/SurfaceGetPixelformatCommand.cpp index 2b5e66f..a65e835 100644 --- a/LayerManagerCommands/src/SurfaceGetPixelformatCommand.cpp +++ b/LayerManagerCommands/src/SurfaceGetPixelformatCommand.cpp @@ -27,12 +27,12 @@ ExecutionResult SurfaceGetPixelformatCommand::execute(ICommandExecutor* executor ExecutionResult result = ExecutionFailed; - Surface* surface = scene.getSurface(m_id); - if (surface) - { - *m_pFormatreturn = surface->getPixelFormat(); - result = ExecutionSuccess; - } + Surface* surface = scene.getSurface(m_id); + if (surface) + { + *m_pFormatreturn = surface->getPixelFormat(); + result = ExecutionSuccess; + } return result; } diff --git a/LayerManagerCommands/src/SurfaceRemoveNativeContentCommand.cpp b/LayerManagerCommands/src/SurfaceRemoveNativeContentCommand.cpp index f211b83..34cc32d 100644 --- a/LayerManagerCommands/src/SurfaceRemoveNativeContentCommand.cpp +++ b/LayerManagerCommands/src/SurfaceRemoveNativeContentCommand.cpp @@ -31,7 +31,7 @@ ExecutionResult SurfaceRemoveNativeContentCommand::execute(ICommandExecutor* exe if (surface) { - if(surface->hasNativeContent()) + if (surface->hasNativeContent()) { surface->removeNativeContent(); result = ExecutionSuccessRedraw; diff --git a/LayerManagerCommands/src/SurfaceSetChromaKeyCommand.cpp b/LayerManagerCommands/src/SurfaceSetChromaKeyCommand.cpp index 54dacab..47b6d34 100644 --- a/LayerManagerCommands/src/SurfaceSetChromaKeyCommand.cpp +++ b/LayerManagerCommands/src/SurfaceSetChromaKeyCommand.cpp @@ -39,7 +39,7 @@ ExecutionResult SurfaceSetChromaKeyCommand::execute(ICommandExecutor* executor) { if (surface) { - LOG_DEBUG("SurfaceSetChromaKeyCommand","new chromakey disable for id: " << m_surfaceid); + LOG_DEBUG("SurfaceSetChromaKeyCommand", "new chromakey disable for id: " << m_surfaceid); result = surface->setChromaKeyEnabled(false) ? ExecutionSuccessRedraw : ExecutionSuccess; } } @@ -47,7 +47,7 @@ ExecutionResult SurfaceSetChromaKeyCommand::execute(ICommandExecutor* executor) { if (surface) { - LOG_DEBUG("SurfaceSetChromaKeyCommand","new chromakey (" << m_array[0] << ", " << m_array[1] << ", " << m_array[2] << ") for id: " << m_surfaceid); + LOG_DEBUG("SurfaceSetChromaKeyCommand", "new chromakey (" << m_array[0] << ", " << m_array[1] << ", " << m_array[2] << ") for id: " << m_surfaceid); bool ansSetEnabled = surface->setChromaKeyEnabled(true); bool ansSetValues = surface->setChromaKey((unsigned char)m_array[0], (unsigned char)m_array[1], (unsigned char)m_array[2]); if ((true == ansSetEnabled) | (true == ansSetValues)) diff --git a/LayerManagerCommands/src/SurfaceSetDestinationRectangleCommand.cpp b/LayerManagerCommands/src/SurfaceSetDestinationRectangleCommand.cpp index da8a945..a4b51e2 100644 --- a/LayerManagerCommands/src/SurfaceSetDestinationRectangleCommand.cpp +++ b/LayerManagerCommands/src/SurfaceSetDestinationRectangleCommand.cpp @@ -42,9 +42,10 @@ ExecutionResult SurfaceSetDestinationRectangleCommand::execute(ICommandExecutor* { result = ExecutionSuccess; } - if ( layerid != Surface::INVALID_ID ) + if (layerid != Surface::INVALID_ID) { - surface->calculateTargetDestination(scene.getLayer(layerid)->getSourceRegion(),scene.getLayer(layerid)->getDestinationRegion()); + surface->calculateTargetDestination(scene.getLayer(layerid)->getSourceRegion(), + scene.getLayer(layerid)->getDestinationRegion()); } } diff --git a/LayerManagerCommands/src/SurfaceSetDimensionCommand.cpp b/LayerManagerCommands/src/SurfaceSetDimensionCommand.cpp index b6e32d3..073d2cf 100644 --- a/LayerManagerCommands/src/SurfaceSetDimensionCommand.cpp +++ b/LayerManagerCommands/src/SurfaceSetDimensionCommand.cpp @@ -30,8 +30,8 @@ ExecutionResult SurfaceSetDimensionCommand::execute(ICommandExecutor* executor) Surface* surface = scene.getSurface(m_id); if (surface) { - unsigned int layerid = surface->getContainingLayerId(); - if(surface->setDimension(m_width, m_height)) + unsigned int layerid = surface->getContainingLayerId(); + if (surface->setDimension(m_width, m_height)) { executor->addClientNotification(surface, ILM_NOTIFICATION_DEST_RECT); result = ExecutionSuccessRedraw; @@ -41,10 +41,11 @@ ExecutionResult SurfaceSetDimensionCommand::execute(ICommandExecutor* executor) result = ExecutionSuccess; } - if ( layerid != Surface::INVALID_ID ) - { - surface->calculateTargetDestination(scene.getLayer(layerid)->getSourceRegion(),scene.getLayer(layerid)->getDestinationRegion()); - } + if (layerid != Surface::INVALID_ID) + { + surface->calculateTargetDestination(scene.getLayer(layerid)->getSourceRegion(), + scene.getLayer(layerid)->getDestinationRegion()); + } } return result; diff --git a/LayerManagerCommands/src/SurfaceSetKeyboardFocusCommand.cpp b/LayerManagerCommands/src/SurfaceSetKeyboardFocusCommand.cpp index 4ba3743..d623ab4 100644 --- a/LayerManagerCommands/src/SurfaceSetKeyboardFocusCommand.cpp +++ b/LayerManagerCommands/src/SurfaceSetKeyboardFocusCommand.cpp @@ -36,14 +36,14 @@ ExecutionResult SurfaceSetKeyboardFocusCommand::execute(ICommandExecutor* execut { result = (*it)->getInputManager()->setKeyboardFocusOn(m_surfId) ? ExecutionSuccess : ExecutionFailed; } - + return result; } const std::string SurfaceSetKeyboardFocusCommand::getString() { std::stringstream description; - + description << "SurfaceSetKeyboardFocusCommand(" << "m_surfId=" << m_surfId << "(0x" << std::hex << m_surfId << ")" << std::dec << ")"; diff --git a/LayerManagerCommands/src/SurfaceSetNativeContentCommand.cpp b/LayerManagerCommands/src/SurfaceSetNativeContentCommand.cpp index b72f87e..598b8a8 100644 --- a/LayerManagerCommands/src/SurfaceSetNativeContentCommand.cpp +++ b/LayerManagerCommands/src/SurfaceSetNativeContentCommand.cpp @@ -30,7 +30,7 @@ ExecutionResult SurfaceSetNativeContentCommand::execute(ICommandExecutor* execut if (surface) { - if(!surface->hasNativeContent()) + if (!surface->hasNativeContent()) { surface->setNativeContent(m_nativeHandle); surface->setPixelFormat(m_pixelformat); @@ -43,7 +43,7 @@ ExecutionResult SurfaceSetNativeContentCommand::execute(ICommandExecutor* execut result = ExecutionSuccessRedraw; } - else if( (unsigned int) surface->getNativeContent() == m_nativeHandle) + else if ((unsigned int) surface->getNativeContent() == m_nativeHandle) { result = ExecutionSuccess; } diff --git a/LayerManagerCommands/src/SurfaceSetOpacityCommand.cpp b/LayerManagerCommands/src/SurfaceSetOpacityCommand.cpp index 53f387b..c11611a 100644 --- a/LayerManagerCommands/src/SurfaceSetOpacityCommand.cpp +++ b/LayerManagerCommands/src/SurfaceSetOpacityCommand.cpp @@ -31,7 +31,7 @@ ExecutionResult SurfaceSetOpacityCommand::execute(ICommandExecutor* executor) if (surface) { - LOG_DEBUG("SurfaceSetOpacityCommand","new opacity " << m_opacity << " for id: " << m_id); + LOG_DEBUG("SurfaceSetOpacityCommand", "new opacity " << m_opacity << " for id: " << m_id); if (surface->setOpacity(m_opacity)) { executor->addClientNotification(surface, ILM_NOTIFICATION_OPACITY); diff --git a/LayerManagerCommands/src/SurfaceSetPositionCommand.cpp b/LayerManagerCommands/src/SurfaceSetPositionCommand.cpp index 1a0938f..44b58f5 100644 --- a/LayerManagerCommands/src/SurfaceSetPositionCommand.cpp +++ b/LayerManagerCommands/src/SurfaceSetPositionCommand.cpp @@ -43,7 +43,8 @@ ExecutionResult SurfaceSetPositionCommand::execute(ICommandExecutor* executor) } if (layerid != Surface::INVALID_ID) { - surface->calculateTargetDestination(scene.getLayer(layerid)->getSourceRegion(),scene.getLayer(layerid)->getDestinationRegion()); + surface->calculateTargetDestination(scene.getLayer(layerid)->getSourceRegion(), + scene.getLayer(layerid)->getDestinationRegion()); } } return result; diff --git a/LayerManagerCommands/src/SurfaceSetSourceRectangleCommand.cpp b/LayerManagerCommands/src/SurfaceSetSourceRectangleCommand.cpp index 7b0a346..b89f5c4 100644 --- a/LayerManagerCommands/src/SurfaceSetSourceRectangleCommand.cpp +++ b/LayerManagerCommands/src/SurfaceSetSourceRectangleCommand.cpp @@ -41,9 +41,10 @@ ExecutionResult SurfaceSetSourceRectangleCommand::execute(ICommandExecutor* exec { result = ExecutionSuccess; } - if ( layerid != Surface::INVALID_ID ) + if (layerid != Surface::INVALID_ID) { - surface->calculateTargetDestination(scene.getLayer(layerid)->getSourceRegion(),scene.getLayer(layerid)->getDestinationRegion()); + surface->calculateTargetDestination(scene.getLayer(layerid)->getSourceRegion(), + scene.getLayer(layerid)->getDestinationRegion()); } } |