All functions for working with reading data from csv.
More...
|
template<class T > |
bool | mvlt::FromString (const std::string &stringToCopyDataFrom, T &data) noexcept |
| A template method for providing an interface converting string to a any type.
|
|
template<> |
bool | mvlt::FromString (const std::string &stringToCopyDataFrom, std::string &data) noexcept |
| FromString specialization for working with std::string.
|
|
template<> |
bool | mvlt::FromString (const std::string &stringToCopyDataFrom, bool &data) noexcept |
| FromString specialization for working with bool.
|
|
template<class T > |
bool | mvlt::FromStringDoubleAndFloat (const std::string &stringToCopyDataFrom, T &data) noexcept |
| FromStringDoubleAndFloat template for working with float and double.
|
|
template<> |
bool | mvlt::FromString (const std::string &stringToCopyDataFrom, float &data) noexcept |
| FromString specialization for working with float.
|
|
template<> |
bool | mvlt::FromString (const std::string &stringToCopyDataFrom, double &data) noexcept |
| FromString specialization for working with double.
|
|
template<class T > |
bool | mvlt::FromStringSignedInt (const std::string &stringToCopyDataFrom, T &data) noexcept |
| FromStringSignedInt template for working with all signed integers.
|
|
template<> |
bool | mvlt::FromString (const std::string &stringToCopyDataFrom, std::int16_t &data) noexcept |
| FromString specialization for working with std::int16_t int.
|
|
template<> |
bool | mvlt::FromString (const std::string &stringToCopyDataFrom, std::int32_t &data) noexcept |
| FromString specialization for working with std::int32_t.
|
|
template<> |
bool | mvlt::FromString (const std::string &stringToCopyDataFrom, std::int64_t &data) noexcept |
| FromString specialization for working with std::int64_t.
|
|
template<class T > |
bool | mvlt::FromStringUnsignedInt (const std::string &stringToCopyDataFrom, T &data) noexcept |
| FromStringSignedInt template for working with all unsigned signed integers.
|
|
template<> |
bool | mvlt::FromString (const std::string &stringToCopyDataFrom, std::uint16_t &data) noexcept |
| FromString specialization for working with std::uint16_t.
|
|
template<> |
bool | mvlt::FromString (const std::string &stringToCopyDataFrom, std::uint32_t &data) noexcept |
| FromString specialization for working with std::uint32_t.
|
|
template<> |
bool | mvlt::FromString (const std::string &stringToCopyDataFrom, std::uint64_t &data) noexcept |
| FromString specialization for working with unsigned unsigned std::uint64_t.
|
|
All functions for working with reading data from csv.
◆ FromString() [1/11]
template<>
bool mvlt::FromString |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
bool & |
data |
|
) |
| |
|
inlinenoexcept |
FromString specialization for working with bool.
If the string is true, then data will be true and the function will return true. If the string is false, then data will be false and the function will return true. If the string is not true or false, the function returns false.
- Template Parameters
-
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type bool |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false
◆ FromString() [2/11]
template<>
bool mvlt::FromString |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
double & |
data |
|
) |
| |
|
inlinenoexcept |
FromString specialization for working with double.
- Template Parameters
-
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type float |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false
◆ FromString() [3/11]
template<>
bool mvlt::FromString |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
float & |
data |
|
) |
| |
|
inlinenoexcept |
FromString specialization for working with float.
- Template Parameters
-
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type float |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false
◆ FromString() [4/11]
template<>
bool mvlt::FromString |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
std::int16_t & |
data |
|
) |
| |
|
inlinenoexcept |
FromString specialization for working with std::int16_t int.
- Template Parameters
-
<std::int16_t> | int as a type |
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type int |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false
◆ FromString() [5/11]
template<>
bool mvlt::FromString |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
std::int32_t & |
data |
|
) |
| |
|
inlinenoexcept |
FromString specialization for working with std::int32_t.
- Template Parameters
-
<std::int32_t> | int as a type |
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type int |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false
◆ FromString() [6/11]
template<>
bool mvlt::FromString |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
std::int64_t & |
data |
|
) |
| |
|
inlinenoexcept |
FromString specialization for working with std::int64_t.
- Template Parameters
-
<std::int64_t> | int as a type |
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type std::int64_t |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false
◆ FromString() [7/11]
template<>
bool mvlt::FromString |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
std::string & |
data |
|
) |
| |
|
inlinenoexcept |
FromString specialization for working with std::string.
- Template Parameters
-
<std::string> | string as a type |
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type std::string |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false
◆ FromString() [8/11]
template<>
bool mvlt::FromString |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
std::uint16_t & |
data |
|
) |
| |
|
inlinenoexcept |
FromString specialization for working with std::uint16_t.
- Template Parameters
-
<std::uint16_t> | int as a type |
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type unsigned int |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false
◆ FromString() [9/11]
template<>
bool mvlt::FromString |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
std::uint32_t & |
data |
|
) |
| |
|
inlinenoexcept |
FromString specialization for working with std::uint32_t.
- Template Parameters
-
<std::uint32_t> | int as a type |
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type unsigned int |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false
◆ FromString() [10/11]
template<>
bool mvlt::FromString |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
std::uint64_t & |
data |
|
) |
| |
|
inlinenoexcept |
FromString specialization for working with unsigned unsigned std::uint64_t.
- Template Parameters
-
<std::uint64_t> | int as a type |
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type unsigned long int |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false
◆ FromString() [11/11]
bool mvlt::FromString |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
T & |
data |
|
) |
| |
|
inlinenoexcept |
A template method for providing an interface converting string to a any type.
This function allows you to use the same interface inside the Vault for any class, since this function accepts any type. Therefore, if you do not plan to use the functionality of saving to files, then there will be no problems when using a custom type. At the same time, if you plan to work with files, you can specialize this function for each required type.
- Template Parameters
-
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type T |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false
◆ FromStringDoubleAndFloat()
bool mvlt::FromStringDoubleAndFloat |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
T & |
data |
|
) |
| |
|
inlinenoexcept |
FromStringDoubleAndFloat template for working with float and double.
- Template Parameters
-
<T> | floatating type |
<float> | float type |
<double> | double type |
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type float |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false
◆ FromStringSignedInt()
bool mvlt::FromStringSignedInt |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
T & |
data |
|
) |
| |
|
inlinenoexcept |
FromStringSignedInt template for working with all signed integers.
- Template Parameters
-
<T> | signed integer as a type |
<std::int16_t> | std::int16_t int as a type |
<std::int32_t> | std::int32_t int as a type |
<std::int64_t> | std::int64_t int as a type |
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type int |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false
◆ FromStringUnsignedInt()
bool mvlt::FromStringUnsignedInt |
( |
const std::string & |
stringToCopyDataFrom, |
|
|
T & |
data |
|
) |
| |
|
inlinenoexcept |
FromStringSignedInt template for working with all unsigned signed integers.
- Template Parameters
-
<T> | unsigned integer as a type |
<unsigned | short> unsigned short int as a type |
<unsigned | int> unsigned signed int as a type |
<unsigned | long> unsigned long int as a type |
<unsigned | long long> unsigned long long int as a type |
- Parameters
-
[in] | stringToCopyDataFrom | the string to be converted to type int |
[out] | data | the variable where the converted string will be written |
- Returns
- Returns true if the conversion was successful, otherwise it returns false