Gorgon Game Engine
ReferenceProperty< C_, T_, Getter_, Setter_, Update_ > Class Template Reference

Reference property allows clients to access a reference object within the class. More...

Public Types

using Type = T_
 

Public Member Functions

 ReferenceProperty (C_ &Object)
 
 ReferenceProperty (C_ *Object)
 
 ReferenceProperty (const ReferenceProperty &)=delete
 
 ReferenceProperty (ReferenceProperty &&)=default
 
T_ & Get () const
 
T_ * GetPtr () const
 
 operator T_ & ()
 
 operator T_ & () const
 
bool operator!= (const T_ &v) const
 Compares two objects, this performs reference comparison, not lexical. More...
 
bool operator!= (const T_ *v) const
 Compares two objects, this performs reference comparison, not lexical. More...
 
internal::ReferencePropertyWatch< ReferenceProperty< C_, T_, Getter_, Setter_, Update_ > > operator-> ()
 
const T_ * operator-> () const
 
ReferencePropertyoperator= (const ReferenceProperty &)=delete
 
ReferencePropertyoperator= (ReferenceProperty &&)=default
 
ReferencePropertyoperator= (T_ &value)
 
ReferencePropertyoperator= (T_ *value)
 
bool operator== (const T_ &v) const
 Compares two objects, this performs reference comparison, not lexical. More...
 
bool operator== (const T_ *v) const
 Compares two objects, this performs reference comparison, not lexical. More...
 
void Update ()
 

Protected Attributes

C_ & Object
 

Detailed Description

template<class C_, class T_, T_ *(C_::*)() const Getter_, void(C_::*)(T_ *) Setter_, void(C_::*)() Update_>
class Gorgon::ReferenceProperty< C_, T_, Getter_, Setter_, Update_ >

Reference property allows clients to access a reference object within the class.

This property does not have a setter, but instead it uses update function that is called whenever reference object is accessed by using -> operator. The client can call update function manually.

Member Typedef Documentation

◆ Type

using Type = T_

Constructor & Destructor Documentation

◆ ReferenceProperty() [1/4]

ReferenceProperty ( C_ *  Object)

◆ ReferenceProperty() [2/4]

ReferenceProperty ( C_ &  Object)

◆ ReferenceProperty() [3/4]

ReferenceProperty ( const ReferenceProperty< C_, T_, Getter_, Setter_, Update_ > &  )
delete

◆ ReferenceProperty() [4/4]

ReferenceProperty ( ReferenceProperty< C_, T_, Getter_, Setter_, Update_ > &&  )
default

Member Function Documentation

◆ Get()

T_& Get ( ) const

◆ GetPtr()

T_* GetPtr ( ) const

◆ operator T_ &() [1/2]

operator T_ & ( )

◆ operator T_ &() [2/2]

operator T_ & ( ) const

◆ operator!=() [1/2]

bool operator!= ( const T_ &  v) const

Compares two objects, this performs reference comparison, not lexical.

◆ operator!=() [2/2]

bool operator!= ( const T_ *  v) const

Compares two objects, this performs reference comparison, not lexical.

◆ operator->() [1/2]

internal::ReferencePropertyWatch< ReferenceProperty< C_, T_, Getter_, Setter_, Update_ > > operator->

◆ operator->() [2/2]

const T_* operator-> ( ) const

◆ operator=() [1/4]

ReferenceProperty& operator= ( const ReferenceProperty< C_, T_, Getter_, Setter_, Update_ > &  )
delete

◆ operator=() [2/4]

ReferenceProperty& operator= ( ReferenceProperty< C_, T_, Getter_, Setter_, Update_ > &&  )
default

◆ operator=() [3/4]

ReferenceProperty& operator= ( T_ &  value)

◆ operator=() [4/4]

ReferenceProperty& operator= ( T_ *  value)

◆ operator==() [1/2]

bool operator== ( const T_ &  v) const

Compares two objects, this performs reference comparison, not lexical.

◆ operator==() [2/2]

bool operator== ( const T_ *  v) const

Compares two objects, this performs reference comparison, not lexical.

◆ Update()

void Update ( )

Member Data Documentation

◆ Object

C_& Object
protected

The documentation for this class was generated from the following file: