combined_editor function, and improved dependency handling (removing duplicates), viewer refreshes on events from script manager

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@147 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-12-22 19:05:52 +00:00
parent 7ba562ea2e
commit cf39deec24
20 changed files with 220 additions and 30 deletions
+19
View File
@@ -38,6 +38,25 @@ class Dependency {
inline Dependency makeCardIndependend() const {
return Dependency(type == DEP_CARD_FIELD ? DEP_CARDS_FIELD : type, index, data);
}
inline bool operator == (const Dependency& d) const {
return type == d.type && index == d.index && data == d.data;
}
};
// ----------------------------------------------------------------------------- : Dependencies
/// A list of dependencies
class Dependencies : public vector<Dependency> {
public:
/// Add a dependency, prevents duplicates
inline void add(const Dependency& d) {
if (find(begin(),end(),d) == end()) {
push_back(d);
}
}
private:
using vector<Dependency>::push_back;
};
// ----------------------------------------------------------------------------- : EOF