mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Fixed UserInterface selection of multiple sources. Cleared code for
Source searching by nodes pointers.
This commit is contained in:
38
Source.h
38
Source.h
@@ -85,6 +85,25 @@ public:
|
||||
// a Source shall define how to render into the frame buffer
|
||||
virtual void render() = 0;
|
||||
|
||||
|
||||
struct hasNode: public std::unary_function<Source*, bool>
|
||||
{
|
||||
bool operator()(const Source* elem) const;
|
||||
hasNode(Node *n) : _n(n) { }
|
||||
private:
|
||||
Node *_n;
|
||||
};
|
||||
|
||||
struct hasName: public std::unary_function<Source*, bool>
|
||||
{
|
||||
inline bool operator()(const Source* elem) const {
|
||||
return (elem && elem->name() == _n);
|
||||
}
|
||||
hasName(std::string n) : _n(n) { }
|
||||
private:
|
||||
std::string _n;
|
||||
};
|
||||
|
||||
protected:
|
||||
// name
|
||||
std::string name_;
|
||||
@@ -128,25 +147,6 @@ protected:
|
||||
CloneList clones_;
|
||||
};
|
||||
|
||||
struct hasName: public std::unary_function<Source*, bool>
|
||||
{
|
||||
inline bool operator()(const Source* elem) const {
|
||||
return (elem && elem->name() == _n);
|
||||
}
|
||||
hasName(std::string n) : _n(n) { }
|
||||
|
||||
private:
|
||||
std::string _n;
|
||||
};
|
||||
|
||||
struct hasNode: public std::unary_function<Source*, bool>
|
||||
{
|
||||
bool operator()(const Source* elem) const;
|
||||
hasNode(Node *n) : _n(n) { }
|
||||
|
||||
private:
|
||||
Node *_n;
|
||||
};
|
||||
|
||||
|
||||
class CloneSource : public Source
|
||||
|
||||
Reference in New Issue
Block a user