Class BaseRef
Defined in File base_ref.h
Inheritance Relationships
Base Type
public mindspore::Base
(Class Base)
Derived Types
public mindspore::RunFunctionRef
(Class RunFunctionRef)public mindspore::SetRef
(Class SetRef)public mindspore::VectorRef
(Class VectorRef)
Class Documentation
-
class BaseRef : public mindspore::Base
BaseRef is a base class which store a Base pointer to some real data.
Subclassed by mindspore::RunFunctionRef, mindspore::SetRef, mindspore::VectorRef
Public Functions
-
inline BaseRef()
The Constructor of BaseRef.
- Returns
The instance of BaseRef.
-
BaseRef(const BaseRef &other)
The copy constructor of BaseRef.
- Parameters
other – [in] Define another instance of BaseRef.
- Returns
The instance of BaseRef.
-
inline virtual std::shared_ptr<Base> copy() const
Get the Base pointer to some real data.
- Returns
The Base pointer.
-
inline BaseRef(BaseRef &&other)
The move constructor of BaseRef.
- Parameters
other – [in] Define another instance of BaseRef.
- Returns
The instance of BaseRef.
-
template<class T, class = typename std::enable_if<!std::is_same<typename std::decay<T>::type, BaseRef>::value, T>::type>
inline BaseRef(T &&t) The move constructor of BaseRef with template.
- Parameters
t – [in] Define an instance of T.
- Returns
The instance of BaseRef.
-
inline ~BaseRef() override
The destructor of BaseRef.
- MS_DECLARE_PARENT (BaseRef, Base) bool operator!
The operator overloading for “!=”.
- Parameters
other – [in] Define the right operand of “!=”.
- Returns
The comparison result.
-
inline virtual std::size_t hash() const override
Get the hash value of this object.
- Returns
The hash value.
-
virtual std::string ToString() const override
Get the string representation of this object.
- Returns
The string representation.
-
inline bool is_null() const
Judge whether the real data is null.
- Returns
The result of the judgment.
-
virtual uint32_t type() const
Get the type id of the real data.
- Returns
The type id of the real data.
Public Members
-
BasePtr m_ptr
pointer to the real data
-
inline BaseRef()