{
const Type testtype(get_type(x));
- return same_type_as(testtype);
+ return same_type_as(type, testtype);
}
bool same_type_as(const Type testtype)const
{
- if(testtype==type)return true;
- if( (type==TYPE_REAL || type==TYPE_TIME) &&
- (testtype==TYPE_REAL || testtype==TYPE_TIME) )
+ return same_type_as(type, testtype);
+ }
+
+ //! Compares two types. Returns true if they are the same type.
+ static bool same_type_as(const Type type1, const Type type2)
+ {
+ if (type1 == type2) return true;
+ if ((type1 == TYPE_REAL || type1 == TYPE_TIME) &&
+ (type2 == TYPE_REAL || type2 == TYPE_TIME))
return true;
return false;
}
void set(const float &x) { _set(Real(x)); }
void set(const list_type &x);
void set(const char* x);
+ void set(char* x);
void set(Canvas*x);
void set(etl::loose_handle<Canvas> x);
void set(etl::handle<Canvas> x);
//! Returns a string containing the name of the given Type
static String type_name(Type id);
+ //! Returns a string containing the translated name of the given Type
+ static String type_local_name(Type id);
+
//! Returns a the corresponding Type of the described type
static Type ident_type(const String &str);