typedef ChoiceCondition<BaseTypeTraits> BaseTypeCondition;
-template<typename Traits>
-ChoiceCondition<Traits>::ChoiceCondition(Type v):
+template<typename T>
+ChoiceCondition<T>::ChoiceCondition(Type v):
value(v)
{ }
-template<typename Traits>
-Condition *ChoiceCondition<Traits>::clone() const
+template<typename T>
+Condition *ChoiceCondition<T>::clone() const
{
- return new ChoiceCondition<Traits>(value);
+ return new ChoiceCondition<T>(values);
}
-template<typename Traits>
-bool ChoiceCondition<Traits>::can_merge(const Condition &other, const CompoundCondition &parent) const
+template<typename T>
+bool ChoiceCondition<T>::can_merge(const Condition &other, const CompoundCondition &parent) const
{
- return dynamic_cast<const ChoiceCondition<Traits> *>(&other) && dynamic_cast<const OrCondition *>(&parent);
+ return dynamic_cast<const ChoiceCondition<T> *>(&other) && dynamic_cast<const OrCondition *>(&parent);
}
-template<typename Traits>
-void ChoiceCondition<Traits>::add_lines(std::list<FilterStatement> &st) const
+template<typename T>
+void ChoiceCondition<T>::add_lines(std::list<FilterStatement> &st) const
{
const char *keyword = Traits::get_keyword();
FilterStatement::add_line(st, Msp::format("%s \"%s\"", keyword, value));
}
-template<typename Traits>
-void ChoiceCondition<Traits>::add_merged_lines(const std::vector<Condition *> &conditions, const CompoundCondition &parent, std::list<FilterStatement> &st) const
+template<typename T>
+void ChoiceCondition<T>::add_merged_lines(const std::vector<Condition *> &conditions, const CompoundCondition &parent, std::list<FilterStatement> &st) const
{
if(dynamic_cast<const OrCondition *>(&parent))
{
typedef RangeCondition<LinkedSocketsTraits> LinkedSocketsCondition;
-template<typename Traits>
-RangeCondition<Traits>::RangeCondition(Type v):
+template<typename T>
+RangeCondition<T>::RangeCondition(Type v):
min(v),
max(v)
{ }
-template<typename Traits>
-RangeCondition<Traits>::RangeCondition(Type n, Type x):
+template<typename T>
+RangeCondition<T>::RangeCondition(Type n, Type x):
min(n),
max(x)
{ }
-template<typename Traits>
-Condition *RangeCondition<Traits>::clone() const
+template<typename T>
+Condition *RangeCondition<T>::clone() const
{
- return new RangeCondition<Traits>(min, max);
+ return new RangeCondition<T>(min, max);
}
-template<typename Traits>
-void RangeCondition<Traits>::add_lines(std::list<FilterStatement> &st) const
+template<typename T>
+void RangeCondition<T>::add_lines(std::list<FilterStatement> &st) const
{
const char *keyword = Traits::get_keyword();
if(min==max)