[DEV] change default Instance

This commit is contained in:
Edouard DUPIN 2014-08-13 22:30:47 +02:00
parent 4c20238d3c
commit eb27fa9716
5 changed files with 80 additions and 82 deletions

View File

@ -384,74 +384,73 @@ template<> template<> Color<uint16_t,4>::Color(const Color<double, 4>& _obj) {
// ===========================================================================================================
/*
template<> std::string to_string<Color<int16_t, 1>>(const Color<int16_t, 1>& _val) {
template<> std::string to_string<Color<uint16_t, 1>>(const Color<uint16_t, 1>& _val) {
return _val.getString();
}
template<> std::u32string to_u32string<Color<int16_t, 1>>(const Color<int16_t, 1>& _val) {
template<> std::u32string to_u32string<Color<uint16_t, 1>>(const Color<uint16_t, 1>& _val) {
return to_u32string(_val.getString());
}
template<> bool from_string<Color<int16_t, 1>>(Color<int16_t, 1>& _variableRet, const std::u32string& _value) {
_variableRet = Color<int16_t, 1>(to_string(_value));
template<> bool from_string<Color<uint16_t, 1>>(Color<uint16_t, 1>& _variableRet, const std::u32string& _value) {
_variableRet = Color<uint16_t, 1>(to_string(_value));
return true;
}
template<> bool from_string<Color<int16_t, 1>>(Color<int16_t, 1>& _variableRet, const std::string& _value) {
_variableRet = Color<int16_t, 1>(_value);
template<> bool from_string<Color<uint16_t, 1>>(Color<uint16_t, 1>& _variableRet, const std::string& _value) {
_variableRet = Color<uint16_t, 1>(_value);
return true;
}
template<> std::string to_string<Color<int16_t, 2>>(const Color<int16_t, 2>& _val) {
template<> std::string to_string<Color<uint16_t, 2>>(const Color<uint16_t, 2>& _val) {
return _val.getString();
}
template<> std::u32string to_u32string<Color<int16_t, 2>>(const Color<int16_t, 2>& _val) {
template<> std::u32string to_u32string<Color<uint16_t, 2>>(const Color<uint16_t, 2>& _val) {
return to_u32string(_val.getString());
}
template<> bool from_string<Color<int16_t, 2>>(Color<int16_t, 2>& _variableRet, const std::u32string& _value) {
_variableRet = Color<int16_t, 2>(to_string(_value));
template<> bool from_string<Color<uint16_t, 2>>(Color<uint16_t, 2>& _variableRet, const std::u32string& _value) {
_variableRet = Color<uint16_t, 2>(to_string(_value));
return true;
}
template<> bool from_string<Color<int16_t, 2>>(Color<int16_t, 2>& _variableRet, const std::string& _value) {
_variableRet = Color<int16_t, 2>(_value);
template<> bool from_string<Color<uint16_t, 2>>(Color<uint16_t, 2>& _variableRet, const std::string& _value) {
_variableRet = Color<uint16_t, 2>(_value);
return true;
}
template<> std::string to_string<Color<int16_t, 3>>(const Color<int16_t, 3>& _val) {
template<> std::string to_string<Color<uint16_t, 3>>(const Color<uint16_t, 3>& _val) {
return _val.getString();
}
template<> std::u32string to_u32string<Color<int16_t, 3>>(const Color<int16_t, 3>& _val) {
template<> std::u32string to_u32string<Color<uint16_t, 3>>(const Color<uint16_t, 3>& _val) {
return to_u32string(_val.getString());
}
template<> bool from_string<Color<int16_t, 3>>(Color<int16_t, 3>& _variableRet, const std::u32string& _value) {
_variableRet = Color<int16_t, 3>(to_string(_value));
template<> bool from_string<Color<uint16_t, 3>>(Color<uint16_t, 3>& _variableRet, const std::u32string& _value) {
_variableRet = Color<uint16_t, 3>(to_string(_value));
return true;
}
template<> bool from_string<Color<int16_t, 3>>(Color<int16_t, 3>& _variableRet, const std::string& _value) {
_variableRet = Color<int16_t, 3>(_value);
template<> bool from_string<Color<uint16_t, 3>>(Color<uint16_t, 3>& _variableRet, const std::string& _value) {
_variableRet = Color<uint16_t, 3>(_value);
return true;
}
template<> std::string to_string<Color<int16_t, 4>>(const Color<int16_t, 4>& _val) {
template<> std::string to_string<Color<uint16_t, 4>>(const Color<uint16_t, 4>& _val) {
return _val.getString();
}
template<> std::u32string to_u32string<Color<int16_t, 4>>(const Color<int16_t, 4>& _val) {
template<> std::u32string to_u32string<Color<uint16_t, 4>>(const Color<uint16_t, 4>& _val) {
return to_u32string(_val.getString());
}
template<> bool from_string<Color<int16_t, 4>>(Color<int16_t, 4>& _variableRet, const std::u32string& _value) {
_variableRet = Color<int16_t, 4>(to_string(_value));
template<> bool from_string<Color<uint16_t, 4>>(Color<uint16_t, 4>& _variableRet, const std::u32string& _value) {
_variableRet = Color<uint16_t, 4>(to_string(_value));
return true;
}
template<> bool from_string<Color<int16_t, 4>>(Color<int16_t, 4>& _variableRet, const std::string& _value) {
_variableRet = Color<int16_t, 4>(_value);
template<> bool from_string<Color<uint16_t, 4>>(Color<uint16_t, 4>& _variableRet, const std::string& _value) {
_variableRet = Color<uint16_t, 4>(_value);
return true;
}
*/

View File

@ -384,72 +384,71 @@ template<> template<> Color<uint32_t,4>::Color(const Color<double, 4>& _obj) {
// ===========================================================================================================
/*
template<> std::string to_string<Color<int32_t, 1>>(const Color<int32_t, 1>& _val) {
template<> std::string to_string<Color<uint32_t, 1>>(const Color<uint32_t, 1>& _val) {
return _val.getString();
}
template<> std::u32string to_u32string<Color<int32_t, 1>>(const Color<int32_t, 1>& _val) {
template<> std::u32string to_u32string<Color<uint32_t, 1>>(const Color<uint32_t, 1>& _val) {
return to_u32string(_val.getString());
}
template<> bool from_string<Color<int32_t, 1>>(Color<int32_t, 1>& _variableRet, const std::u32string& _value) {
_variableRet = Color<int32_t, 1>(to_string(_value));
template<> bool from_string<Color<uint32_t, 1>>(Color<uint32_t, 1>& _variableRet, const std::u32string& _value) {
_variableRet = Color<uint32_t, 1>(to_string(_value));
return true;
}
template<> bool from_string<Color<int32_t, 1>>(Color<int32_t, 1>& _variableRet, const std::string& _value) {
_variableRet = Color<int32_t, 1>(_value);
template<> bool from_string<Color<uint32_t, 1>>(Color<uint32_t, 1>& _variableRet, const std::string& _value) {
_variableRet = Color<uint32_t, 1>(_value);
return true;
}
template<> std::string to_string<Color<int32_t, 2>>(const Color<int32_t, 2>& _val) {
template<> std::string to_string<Color<uint32_t, 2>>(const Color<uint32_t, 2>& _val) {
return _val.getString();
}
template<> std::u32string to_u32string<Color<int32_t, 2>>(const Color<int32_t, 2>& _val) {
template<> std::u32string to_u32string<Color<uint32_t, 2>>(const Color<uint32_t, 2>& _val) {
return to_u32string(_val.getString());
}
template<> bool from_string<Color<int32_t, 2>>(Color<int32_t, 2>& _variableRet, const std::u32string& _value) {
_variableRet = Color<int32_t, 2>(to_string(_value));
template<> bool from_string<Color<uint32_t, 2>>(Color<uint32_t, 2>& _variableRet, const std::u32string& _value) {
_variableRet = Color<uint32_t, 2>(to_string(_value));
return true;
}
template<> bool from_string<Color<int32_t, 2>>(Color<int32_t, 2>& _variableRet, const std::string& _value) {
_variableRet = Color<int32_t, 2>(_value);
template<> bool from_string<Color<uint32_t, 2>>(Color<uint32_t, 2>& _variableRet, const std::string& _value) {
_variableRet = Color<uint32_t, 2>(_value);
return true;
}
template<> std::string to_string<Color<int32_t, 3>>(const Color<int32_t, 3>& _val) {
template<> std::string to_string<Color<uint32_t, 3>>(const Color<uint32_t, 3>& _val) {
return _val.getString();
}
template<> std::u32string to_u32string<Color<int32_t, 3>>(const Color<int32_t, 3>& _val) {
template<> std::u32string to_u32string<Color<uint32_t, 3>>(const Color<uint32_t, 3>& _val) {
return to_u32string(_val.getString());
}
template<> bool from_string<Color<int32_t, 3>>(Color<int32_t, 3>& _variableRet, const std::u32string& _value) {
_variableRet = Color<int32_t, 3>(to_string(_value));
template<> bool from_string<Color<uint32_t, 3>>(Color<uint32_t, 3>& _variableRet, const std::u32string& _value) {
_variableRet = Color<uint32_t, 3>(to_string(_value));
return true;
}
template<> bool from_string<Color<int32_t, 3>>(Color<int32_t, 3>& _variableRet, const std::string& _value) {
_variableRet = Color<int32_t, 3>(_value);
template<> bool from_string<Color<uint32_t, 3>>(Color<uint32_t, 3>& _variableRet, const std::string& _value) {
_variableRet = Color<uint32_t, 3>(_value);
return true;
}
template<> std::string to_string<Color<int32_t, 4>>(const Color<int32_t, 4>& _val) {
template<> std::string to_string<Color<uint32_t, 4>>(const Color<uint32_t, 4>& _val) {
return _val.getString();
}
template<> std::u32string to_u32string<Color<int32_t, 4>>(const Color<int32_t, 4>& _val) {
template<> std::u32string to_u32string<Color<uint32_t, 4>>(const Color<uint32_t, 4>& _val) {
return to_u32string(_val.getString());
}
template<> bool from_string<Color<int32_t, 4>>(Color<int32_t, 4>& _variableRet, const std::u32string& _value) {
_variableRet = Color<int32_t, 4>(to_string(_value));
template<> bool from_string<Color<uint32_t, 4>>(Color<uint32_t, 4>& _variableRet, const std::u32string& _value) {
_variableRet = Color<uint32_t, 4>(to_string(_value));
return true;
}
template<> bool from_string<Color<int32_t, 4>>(Color<int32_t, 4>& _variableRet, const std::string& _value) {
_variableRet = Color<int32_t, 4>(_value);
template<> bool from_string<Color<uint32_t, 4>>(Color<uint32_t, 4>& _variableRet, const std::string& _value) {
_variableRet = Color<uint32_t, 4>(_value);
return true;
}
*/

View File

@ -383,75 +383,75 @@ template<> template<> Color<uint8_t,4>::Color(const Color<double, 4>& _obj) {
}
// ===========================================================================================================
/*
template<> std::string to_string<Color<int8_t, 1>>(const Color<int8_t, 1>& _val) {
template<> std::string to_string<Color<uint8_t, 1>>(const Color<uint8_t, 1>& _val) {
return _val.getString();
}
template<> std::u32string to_u32string<Color<int8_t, 1>>(const Color<int8_t, 1>& _val) {
template<> std::u32string to_u32string<Color<uint8_t, 1>>(const Color<uint8_t, 1>& _val) {
return to_u32string(_val.getString());
}
template<> bool from_string<Color<int8_t, 1>>(Color<int8_t, 1>& _variableRet, const std::u32string& _value) {
_variableRet = Color<int8_t, 1>(to_string(_value));
template<> bool from_string<Color<uint8_t, 1>>(Color<uint8_t, 1>& _variableRet, const std::u32string& _value) {
_variableRet = Color<uint8_t, 1>(to_string(_value));
return true;
}
template<> bool from_string<Color<int8_t, 1>>(Color<int8_t, 1>& _variableRet, const std::string& _value) {
_variableRet = Color<int8_t, 1>(_value);
template<> bool from_string<Color<uint8_t, 1>>(Color<uint8_t, 1>& _variableRet, const std::string& _value) {
_variableRet = Color<uint8_t, 1>(_value);
return true;
}
template<> std::string to_string<Color<int8_t, 2>>(const Color<int8_t, 2>& _val) {
template<> std::string to_string<Color<uint8_t, 2>>(const Color<uint8_t, 2>& _val) {
return _val.getString();
}
template<> std::u32string to_u32string<Color<int8_t, 2>>(const Color<int8_t, 2>& _val) {
template<> std::u32string to_u32string<Color<uint8_t, 2>>(const Color<uint8_t, 2>& _val) {
return to_u32string(_val.getString());
}
template<> bool from_string<Color<int8_t, 2>>(Color<int8_t, 2>& _variableRet, const std::u32string& _value) {
_variableRet = Color<int8_t, 2>(to_string(_value));
template<> bool from_string<Color<uint8_t, 2>>(Color<uint8_t, 2>& _variableRet, const std::u32string& _value) {
_variableRet = Color<uint8_t, 2>(to_string(_value));
return true;
}
template<> bool from_string<Color<int8_t, 2>>(Color<int8_t, 2>& _variableRet, const std::string& _value) {
_variableRet = Color<int8_t, 2>(_value);
template<> bool from_string<Color<uint8_t, 2>>(Color<uint8_t, 2>& _variableRet, const std::string& _value) {
_variableRet = Color<uint8_t, 2>(_value);
return true;
}
template<> std::string to_string<Color<int8_t, 3>>(const Color<int8_t, 3>& _val) {
template<> std::string to_string<Color<uint8_t, 3>>(const Color<uint8_t, 3>& _val) {
return _val.getString();
}
template<> std::u32string to_u32string<Color<int8_t, 3>>(const Color<int8_t, 3>& _val) {
template<> std::u32string to_u32string<Color<uint8_t, 3>>(const Color<uint8_t, 3>& _val) {
return to_u32string(_val.getString());
}
template<> bool from_string<Color<int8_t, 3>>(Color<int8_t, 3>& _variableRet, const std::u32string& _value) {
_variableRet = Color<int8_t, 3>(to_string(_value));
template<> bool from_string<Color<uint8_t, 3>>(Color<uint8_t, 3>& _variableRet, const std::u32string& _value) {
_variableRet = Color<uint8_t, 3>(to_string(_value));
return true;
}
template<> bool from_string<Color<int8_t, 3>>(Color<int8_t, 3>& _variableRet, const std::string& _value) {
_variableRet = Color<int8_t, 3>(_value);
template<> bool from_string<Color<uint8_t, 3>>(Color<uint8_t, 3>& _variableRet, const std::string& _value) {
_variableRet = Color<uint8_t, 3>(_value);
return true;
}
template<> std::string to_string<Color<int8_t, 4>>(const Color<int8_t, 4>& _val) {
template<> std::string to_string<Color<uint8_t, 4>>(const Color<uint8_t, 4>& _val) {
return _val.getString();
}
template<> std::u32string to_u32string<Color<int8_t, 4>>(const Color<int8_t, 4>& _val) {
template<> std::u32string to_u32string<Color<uint8_t, 4>>(const Color<uint8_t, 4>& _val) {
return to_u32string(_val.getString());
}
template<> bool from_string<Color<int8_t, 4>>(Color<int8_t, 4>& _variableRet, const std::u32string& _value) {
_variableRet = Color<int8_t, 4>(to_string(_value));
template<> bool from_string<Color<uint8_t, 4>>(Color<uint8_t, 4>& _variableRet, const std::u32string& _value) {
_variableRet = Color<uint8_t, 4>(to_string(_value));
return true;
}
template<> bool from_string<Color<int8_t, 4>>(Color<int8_t, 4>& _variableRet, const std::string& _value) {
_variableRet = Color<int8_t, 4>(_value);
template<> bool from_string<Color<uint8_t, 4>>(Color<uint8_t, 4>& _variableRet, const std::string& _value) {
_variableRet = Color<uint8_t, 4>(_value);
return true;
}
*/

View File

@ -384,7 +384,7 @@ template<> template<> Color<double,4>::Color(const Color<double, 4>& _obj) {
// ===========================================================================================================
/*
template<> std::string to_string<Color<double, 1>>(const Color<double, 1>& _val) {
return _val.getString();
}
@ -456,4 +456,4 @@ template<> bool from_string<Color<double, 4>>(Color<double, 4>& _variableRet, co
_variableRet = Color<double, 4>(_value);
return true;
}
*/

View File

@ -382,7 +382,7 @@ template<> template<> Color<float,4>::Color(const Color<double, 4>& _obj) {
m_element[3] = (float)_obj.a();
}
/*
template<> std::string to_string<Color<float, 1>>(const Color<float, 1>& _val) {
return _val.getString();
}
@ -449,4 +449,4 @@ template<> bool from_string<Color<float, 4>>(Color<float, 4>& _variableRet, cons
_variableRet = Color<float, 4>(_value);
return true;
}
*/