mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 23:40:02 +01:00
C++ improved declaration of singleton managers
This commit is contained in:
@@ -12,8 +12,8 @@ class Action
|
||||
{
|
||||
// Private Constructor
|
||||
Action();
|
||||
Action(Action const& copy); // Not Implemented
|
||||
Action& operator=(Action const& copy); // Not Implemented
|
||||
Action(Action const& copy) = delete;
|
||||
Action& operator=(Action const& copy) = delete;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@ class Connection
|
||||
|
||||
// Private Constructor
|
||||
Connection();
|
||||
Connection(Connection const& copy); // Not Implemented
|
||||
Connection& operator=(Connection const& copy); // Not Implemented
|
||||
Connection(Connection const& copy) = delete;
|
||||
Connection& operator=(Connection const& copy) = delete;
|
||||
|
||||
public:
|
||||
static Connection& manager()
|
||||
|
||||
@@ -87,8 +87,8 @@ class Device
|
||||
friend class DeviceSource;
|
||||
|
||||
Device();
|
||||
Device(Device const& copy); // Not Implemented
|
||||
Device& operator=(Device const& copy); // Not Implemented
|
||||
Device(Device const& copy) = delete;
|
||||
Device& operator=(Device const& copy) = delete;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@@ -84,8 +84,8 @@ class FrameGrabbing
|
||||
|
||||
// Private Constructor
|
||||
FrameGrabbing();
|
||||
FrameGrabbing(FrameGrabbing const& copy); // Not Implemented
|
||||
FrameGrabbing& operator=(FrameGrabbing const& copy); // Not Implemented
|
||||
FrameGrabbing(FrameGrabbing const& copy) = delete;
|
||||
FrameGrabbing& operator=(FrameGrabbing const& copy) = delete;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@@ -22,6 +22,14 @@ void Interpolator::apply(float percent)
|
||||
cursor_ = CLAMP( percent, 0.f, 1.f);
|
||||
|
||||
|
||||
if (cursor_ < EPSILON)
|
||||
current_ = from_;
|
||||
else if (cursor_ > 1.f - EPSILON)
|
||||
current_ = to_;
|
||||
else {
|
||||
// current_ =
|
||||
}
|
||||
|
||||
subject_->copy(current_);
|
||||
|
||||
}
|
||||
|
||||
4
Mixer.h
4
Mixer.h
@@ -19,8 +19,8 @@ class Mixer
|
||||
{
|
||||
// Private Constructor
|
||||
Mixer();
|
||||
Mixer(Mixer const& copy); // Not Implemented
|
||||
Mixer& operator=(Mixer const& copy); // Not Implemented
|
||||
Mixer(Mixer const& copy) = delete;
|
||||
Mixer& operator=(Mixer const& copy) = delete;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@@ -92,8 +92,8 @@ class Rendering
|
||||
|
||||
// Private Constructor
|
||||
Rendering();
|
||||
Rendering(Rendering const& copy); // Not Implemented
|
||||
Rendering& operator=(Rendering const& copy); // Not Implemented
|
||||
Rendering(Rendering const& copy) = delete;
|
||||
Rendering& operator=(Rendering const& copy) = delete;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
4
Source.h
4
Source.h
@@ -41,6 +41,8 @@ public:
|
||||
// a Source always has an image processing shader
|
||||
inline ImageProcessingShader *processingShader () const { return processingshader_; }
|
||||
|
||||
void copy(SourceCore const& other);
|
||||
|
||||
protected:
|
||||
// nodes
|
||||
std::map<View::Mode, Group*> groups_;
|
||||
@@ -51,8 +53,6 @@ protected:
|
||||
// pointer to the currently attached shader
|
||||
// (will be processingshader_ if image processing is enabled)
|
||||
Shader *renderingshader_;
|
||||
|
||||
void copy(SourceCore const& other);
|
||||
};
|
||||
|
||||
class Source : public SourceCore
|
||||
|
||||
@@ -29,8 +29,8 @@ class Streaming
|
||||
|
||||
// Private Constructor
|
||||
Streaming();
|
||||
Streaming(Streaming const& copy); // Not Implemented
|
||||
Streaming& operator=(Streaming const& copy); // Not Implemented
|
||||
Streaming(Streaming const& copy) = delete;
|
||||
Streaming& operator=(Streaming const& copy) = delete;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@@ -125,8 +125,8 @@ class UserInterface
|
||||
|
||||
// Private Constructor
|
||||
UserInterface();
|
||||
UserInterface(UserInterface const& copy); // Not Implemented
|
||||
UserInterface& operator=(UserInterface const& copy); // Not Implemented
|
||||
UserInterface(UserInterface const& copy) = delete;
|
||||
UserInterface& operator=(UserInterface const& copy) = delete;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user