mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Isolate implementation of CloneSource
This commit is contained in:
31
Source.h
31
Source.h
@@ -328,37 +328,6 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
class CloneSource : public Source
|
||||
{
|
||||
friend class Source;
|
||||
|
||||
public:
|
||||
~CloneSource();
|
||||
|
||||
// implementation of source API
|
||||
void setActive (bool on) override;
|
||||
bool playing () const override { return true; }
|
||||
void play (bool) override {}
|
||||
bool playable () const override { return false; }
|
||||
void replay () override {}
|
||||
uint texture() const override;
|
||||
bool failed() const override { return origin_ == nullptr; }
|
||||
void accept (Visitor& v) override;
|
||||
|
||||
CloneSource *clone(uint64_t id = 0) override;
|
||||
inline void detach() { origin_ = nullptr; }
|
||||
inline Source *origin() const { return origin_; }
|
||||
|
||||
glm::ivec2 icon() const override;
|
||||
std::string info() const override;
|
||||
|
||||
protected:
|
||||
// only Source class can create new CloneSource via clone();
|
||||
CloneSource(Source *origin, uint64_t id = 0);
|
||||
|
||||
void init() override;
|
||||
Source *origin_;
|
||||
};
|
||||
|
||||
|
||||
#endif // SOURCE_H
|
||||
|
||||
Reference in New Issue
Block a user