39 memcpy(
data_.data(), &value,
sizeof(char));
43 data_(sizeof(unsigned char))
45 memcpy(
data_.data(), &value,
sizeof(
unsigned char));
51 memcpy(
data_.data(), &value,
sizeof(short));
55 data_(sizeof(unsigned short))
57 memcpy(
data_.data(), &value,
sizeof(
unsigned short));
63 memcpy(
data_.data(), &value,
sizeof(int));
67 data_(sizeof(unsigned int))
69 memcpy(
data_.data(), &value,
sizeof(
unsigned int));
75 memcpy(
data_.data(), &value,
sizeof(float));
81 memcpy(
data_.data(), &value,
sizeof(double));
86 std::string str(value);
87 data_.resize(str.size()+1);
88 memcpy(
data_.data(), str.data(), str.size()+1);
94 memcpy(
data_.data(), value.data(), value.size()+1);
98 data_(sizeof(char)*value.size())
100 memcpy(
data_.data(), value.data(),
sizeof(char)*value.size());
104 data_(sizeof(unsigned char)*value.size())
106 memcpy(
data_.data(), value.data(),
sizeof(
unsigned char)*value.size());
110 data_(sizeof(short)*value.size())
112 memcpy(
data_.data(), value.data(),
sizeof(short)*value.size());
116 data_(sizeof(unsigned short)*value.size())
118 memcpy(
data_.data(), value.data(),
sizeof(
unsigned short)*value.size());
122 data_(sizeof(int)*value.size())
124 memcpy(
data_.data(), value.data(),
sizeof(int)*value.size());
128 data_(sizeof(unsigned int)*value.size())
130 memcpy(
data_.data(), value.data(),
sizeof(
unsigned int)*value.size());
134 data_(sizeof(float)*value.size())
136 memcpy(
data_.data(), value.data(),
sizeof(float)*value.size());
140 data_(sizeof(double)*value.size())
142 memcpy(
data_.data(), value.data(),
sizeof(double)*value.size());
151 else if(
data_.size())
153 return memcmp(
data_.data(), std::vector<unsigned char>(
data_.size(), 0).
data(),
data_.size()) != 0;
167 memcpy(&v,
data_.data(),
sizeof(char));
223 unsigned int tmp =
toUInt();
244 memcpy(&v,
data_.data(),
sizeof(
unsigned char));
255 v = (
unsigned char)tmp;
267 v = (
unsigned char)tmp;
279 v = (
unsigned char)tmp;
291 v = (
unsigned char)tmp;
300 unsigned int tmp =
toUInt();
303 v = (
unsigned char)tmp;
321 memcpy(&v,
data_.data(),
sizeof(short));
369 unsigned int tmp =
toUInt();
387 unsigned short v = 0;
390 memcpy(&v,
data_.data(),
sizeof(
unsigned short));
401 v = (
unsigned short)tmp;
421 v = (
unsigned short)tmp;
433 v = (
unsigned short)tmp;
442 unsigned int tmp =
toUInt();
445 v = (
unsigned short)tmp;
463 memcpy(&v,
data_.data(),
sizeof(int));
503 unsigned int tmp =
toUInt();
524 memcpy(&v,
data_.data(),
sizeof(
unsigned int));
535 v = (
unsigned int)tmp;
555 v = (
unsigned int)tmp;
575 v = (
unsigned int)tmp;
593 memcpy(&v,
data_.data(),
sizeof(float));
622 memcpy(&v,
data_.data(),
sizeof(double));
643 v = std::string((
const char *)
data_.data());
651 v =
toBool()?
"true":
"false";
709 v.resize(
data_.size() /
sizeof(char));
723 std::vector<unsigned char> v;
732 v.resize(
data_.size() /
sizeof(
unsigned char));
746 std::vector<short> v;
755 v.resize(
data_.size() /
sizeof(short));
768 std::vector<unsigned short> v;
777 v.resize(
data_.size() /
sizeof(
unsigned short));
799 v.resize(
data_.size() /
sizeof(int));
812 std::vector<unsigned int> v;
821 v.resize(
data_.size() /
sizeof(
unsigned int));
834 std::vector<float> v;
843 v.resize(
data_.size() /
sizeof(float));
856 std::vector<double> v;
865 v.resize(
data_.size() /
sizeof(double));
GLM_FUNC_DECL genType min(genType const &x, genType const &y)
unsigned int toUInt(bool *ok=0) const
double toDouble(bool *ok=0) const
short toShort(bool *ok=0) const
bool UTILITE_EXP uStr2Bool(const char *str)
unsigned char toUChar(bool *ok=0) const
std::vector< int > toIntArray(bool *ok=0) const
Some conversion functions.
std::vector< unsigned char > data_
int toInt(bool *ok=0) const
std::vector< float > toFloatArray(bool *ok=0) const
std::vector< char > toCharArray(bool *ok=0) const
std::vector< short > toShortArray(bool *ok=0) const
float toFloat(bool *ok=0) const
std::vector< double > toDoubleArray(bool *ok=0) const
std::vector< unsigned char > toUCharArray(bool *ok=0) const
char toChar(bool *ok=0) const
std::vector< unsigned int > toUIntArray(bool *ok=0) const
std::string toStr(bool *ok=0) const
GLM_FUNC_DECL genType max(genType const &x, genType const &y)
unsigned short toUShort(bool *ok=0) const
std::vector< unsigned short > toUShortArray(bool *ok=0) const
std::string UTILITE_EXP uNumber2Str(unsigned int number)