Шаблон класса C++ для получения ссылок на Array элементы
A Reference объект является ссылкой на элемент Array не делая копий. a Reference является:
Не является общей копией
Действительно, пока массив, содержащий ссылку, действителен
Не thread-safe
|
Пространство имен: | matlab::data |
|
Включите: | Reference.hpp |
|
|
Тип элемента, указанного как:
|
Reference(const Reference<T>& rhs)
|
|
Значение для копирования. |
Reference<T>& operator=(const Reference<T>& rhs)
|
|
Значение для копирования. |
|
|
Обновленный образец. |
Reference<T>& operator=(Reference<T>&&
rhs)
|
|
Значение для перемещения. |
|
|
Обновленный образец. |
Ничего
Reference(Reference<T>&& rhs)
Перемещение содержимого Reference объект новому образцу.
|
|
Значение для перемещения. |
Ничего
operator=Reference<T>& operator=(T rhs)
Reference<T>& operator=(std::string rhs)
Reference<T>& operator=(String rhs)
|
|
Значение для присвоения. Индексированный массив должен быть не - |
|
|
Строка для назначения. Массив должен быть не - |
|
|
Строка для назначения |
|
|
Обновленный образец. |
Ничего
std::ostream& operator <<(std::ostream& os, Reference<T> const& rhs)
|
| |
|
|
|
|
operator T()operator T() const
Приведение к элементу из массива.
|
|
Общая копия элемента из массива. |
Ничего
operator std::string()operator std::string() const
Преобразует массив в std::string, делая копию std::string. Этот оператор действителен только для типов, которые можно перенести в std::string.
|
|
Строка. |
| Вход |
|
|
inline bool operator ==(Reference<MATLABString> const& lhs, std::string const& rhs)
inline bool operator ==(std::string const& lhs, Reference<MATLABString> const& rhs)
inline bool operator ==(Reference<MATLABString> const& lhs, String const& rhs)
inline bool operator ==(String const& lhs, Reference<MATLABString> const& rhs)
inline bool operator ==(Reference<MATLABString> const& lhs, MATLABString const& rhs)
inline bool operator ==(MATLABString const& lhs, Reference<MATLABString> const& rhs)
inline bool operator ==(Reference<MATLABString> const& lhs, Reference<MATLABString> const& rhs)
template<typename T>
bool operator ==(Reference<T> const& lhs, T const& rhs)
template<typename T>
bool operator ==(T const& lhs, Reference<T> const& rhs)
template<typename T>
bool operator ==(Reference<T> const& lhs, Reference<T> const& rhs)
|
|
|
Значения для сравнения. |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
|
|
|
Возвращает |
|
|
Не удается сравнить аргумент с |