CoreLinux++  0.4.32
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
corelinux::Proxy< SubjectImpl > Class Template Reference

Provide a surrogate or placeholder for another object to control access to it. More...

#include <Proxy.hpp>

Public Member Functions

 Proxy (void)
 Default constructor.
 
 throw (Assertion)
 Constructor with SubjectImpl instance. More...
 
 Proxy (const Proxy &aProxy)
 Copy constructor. More...
 
virtual ~Proxy (void)
 Virtual destructor.
 
Proxyoperator= (const Proxy &aProxy)
 Assignment operator. More...
 
bool operator== (const Proxy &aProxy) const
 Equality operator. More...
 
virtual SubjectImpl * operator-> (void)
 Operator selector overload. More...
 
virtual SubjectImpl & operator* (void) throw ( Assertion )
 Operator dereference overload. More...
 
virtual const SubjectImpl & getSubject (void) const throw ( Assertion )
 Returns a reference to theSubjec. More...
 

Protected Member Functions

virtual void setSubject (SubjectImpl *aSubject)
 

Protected Attributes

SubjectImpl * theSubject
 The subject pointer.
 

Detailed Description

template<class SubjectImpl>
class corelinux::Proxy< SubjectImpl >

Provide a surrogate or placeholder for another object to control access to it.

Constructor & Destructor Documentation

template<class SubjectImpl >
corelinux::Proxy< SubjectImpl >::Proxy ( const Proxy< SubjectImpl > &  aProxy)
inline

Copy constructor.

Parameters
Proxyconst reference

Member Function Documentation

template<class SubjectImpl >
virtual const SubjectImpl& corelinux::Proxy< SubjectImpl >::getSubject ( void  ) const
throw (Assertion
)
inlinevirtual

Returns a reference to theSubjec.

Returns
SubjectImpl const reference
Exceptions
Assertionif theSubject is NULLPTR

References corelinux::Proxy< SubjectImpl >::theSubject.

Referenced by corelinux::Proxy< SubjectImpl >::operator=(), and corelinux::Proxy< SubjectImpl >::operator==().

template<class SubjectImpl >
virtual SubjectImpl& corelinux::Proxy< SubjectImpl >::operator* ( void  )
throw (Assertion
)
inlinevirtual

Operator dereference overload.

Returns
SubjectImpl reference
Exceptions
Assertionif theSubject is NULLPTR

References corelinux::Proxy< SubjectImpl >::theSubject.

template<class SubjectImpl >
virtual SubjectImpl* corelinux::Proxy< SubjectImpl >::operator-> ( void  )
inlinevirtual

Operator selector overload.

Returns
SubjectImpl pointer

References corelinux::Proxy< SubjectImpl >::theSubject.

template<class SubjectImpl >
Proxy& corelinux::Proxy< SubjectImpl >::operator= ( const Proxy< SubjectImpl > &  aProxy)
inline

Assignment operator.

Parameters
Proxyconst reference
Returns
Proxy reference

References corelinux::Proxy< SubjectImpl >::getSubject(), and corelinux::Proxy< SubjectImpl >::theSubject.

template<class SubjectImpl >
bool corelinux::Proxy< SubjectImpl >::operator== ( const Proxy< SubjectImpl > &  aProxy) const
inline

Equality operator.

Parameters
Proxyconst reference
Returns
bool if same

References corelinux::Proxy< SubjectImpl >::getSubject(), and corelinux::Proxy< SubjectImpl >::theSubject.

template<class SubjectImpl >
corelinux::Proxy< SubjectImpl >::throw ( Assertion  )
inline

Constructor with SubjectImpl instance.

Parameters
SubjectImplpointer

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

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium