Skip to content

Commit

Permalink
Renamed selection interface in code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ppt-adsk committed Dec 11, 2023
1 parent dbb66a8 commit 2d19b9d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/flowViewport/API/fvpSelectionClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace FVP_NS_DEF
{
/**
* SelectionClient is the definition of selection callbacks for a Hydra viewport.
* Subclass this class to register an instance of SelectionClient with Fvp::FlowSelectionInterface::RegisterSelectionClient
* Subclass this class to register an instance of SelectionClient with Fvp::SelectionInterface::RegisterSelectionClient
*/
class FVP_API SelectionClient
{
Expand Down
12 changes: 6 additions & 6 deletions lib/flowViewport/API/fvpSelectionInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ namespace FVP_NS_DEF
class SelectionClient;//Predeclaration

/**
* FlowSelectionInterface is used to register/unregister selection callbacks SelectionClient for a Hydra viewport.
* To get an instance of the FlowSelectionInterface class, please use :
* Fvp::FlowSelectionInterface& flowSelectionInterface = Fvp::FlowSelectionInterface::Get();
* SelectionInterface is used to register/unregister selection callbacks SelectionClient for a Hydra viewport.
* To get an instance of the SelectionInterface class, please use :
* Fvp::SelectionInterface& flowSelectionInterface = Fvp::SelectionInterface::Get();
*/
class FlowSelectionInterface
class SelectionInterface
{
public:

/**
* @brief Access to this interface
*
* @return A reference on the FlowSelectionInterface
* @return A reference on the SelectionInterface
*/
static FVP_API FlowSelectionInterface& Get();
static FVP_API SelectionInterface& Get();

/**
* @brief Register a callbacks SelectionClient instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace FVP_NS_DEF {

SelectionClientSet _viewportSelectionClients;

FlowSelectionInterface& FlowSelectionInterface::Get()
SelectionInterface& SelectionInterface::Get()
{
return SelectionInterfaceImp::Get();
}
Expand Down
6 changes: 3 additions & 3 deletions lib/flowViewport/API/interfacesImp/fvpSelectionInterfaceImp.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

//Local headers
#include <flowViewport/api.h>
#include <flowViewport/API/fvpFlowSelectionInterface.h>
#include <flowViewport/API/fvpSelectionInterface.h>
#include <flowViewport/API/fvpSelectionClient.h>

namespace FVP_NS_DEF {

///Is a singleton, use SelectionInterfaceImp& selInterfaceImp = SelectionInterfaceImp::Get() to get an instance of that interface
class SelectionInterfaceImp : public FVP_NS_DEF::FlowSelectionInterface
class SelectionInterfaceImp : public FVP_NS_DEF::SelectionInterface
{
public:
virtual ~SelectionInterfaceImp() = default;
Expand All @@ -46,4 +46,4 @@ class SelectionInterfaceImp : public FVP_NS_DEF::FlowSelectionInterface

} //End of namespace FVP_NS_DEF

#endif // FLOW_VIEWPORT_API_INTERFACESIMP_SELECTIONINTERFACEIMP_H
#endif // FLOW_VIEWPORT_API_INTERFACESIMP_SELECTIONINTERFACEIMP_H
6 changes: 3 additions & 3 deletions lib/flowViewport/API/samples/fvpSelectionClientExample.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//Local headers
#include "flowViewport/api.h"
#include "flowViewport/API/fvpSelectionClient.h"
#include "flowViewport/API/fvpFlowSelectionInterface.h"
#include "flowViewport/API/fvpSelectionInterface.h"

namespace FVP_NS_DEF {

Expand All @@ -32,15 +32,15 @@ class FVP_API SelectionClientExample : public SelectionClient
~SelectionClientExample() override;

///Set the hydra interface
void SetHydraInterface(FlowSelectionInterface* si) {_hydraViewportSelectionInterface = si;}
void SetHydraInterface(SelectionInterface* si) {_hydraViewportSelectionInterface = si;}

///From FlowViewport::SelectionClient
///This is a dummy callback function to be replaced
void DummySelectionCallback()override;

protected:
///Store the Hydra interface pointer
FlowSelectionInterface* _hydraViewportSelectionInterface = nullptr;
SelectionInterface* _hydraViewportSelectionInterface = nullptr;
};

} //end of namespace FVP_NS_DEF
Expand Down

0 comments on commit 2d19b9d

Please sign in to comment.