19 #ifndef OPERATIONTYPE_H 20 #define OPERATIONTYPE_H 45 copy,
sqrt,
exp,
ln,
sin,
cos,
tan,
asin,
acos,
atan,
59 static std::string
typeName(
int type);
64 namespace OperationTypeInfo
74 template<
class Base,
template <minsky::OperationType::Type>
class T,
81 virtual Base*
create()
const=0;
84 std::vector<std::unique_ptr<CreatorBase>>
creators;
89 Base*
create()
const {
return new U();}
94 template <
int I,
int J>
99 typename classdesc::enable_if<classdesc::Not<is_equal<I,N>>,
void>::T
106 typename classdesc::enable_if<is_equal<I,N>,
void>::T
122 using minsky::operator<<;
125 #include "operationType.cd" 126 #include "operationType.xcd"
classdesc::enable_if< classdesc::Not< is_equal< I, N > >, void >::T registerNext()
virtual Base * create() const =0
int numArguments()
number of inputs this operator type has
Base * create(OperationType::Type o) const
create an object of type T<o> on the heap
classdesc::enable_if< is_equal< I, N >, void >::T registerNext()
std::ostream & operator<<(std::ostream &o, OperationType::Type t)
static std::string typeName(int type)
return the symbolic name of type
factory class template, for creating objects of type T<O>. N is the maximum value of O ...
std::vector< std::unique_ptr< CreatorBase > > creators
static Group classify(Type t)