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.
| Proxy (SubjectImpl *aSubject) throw (Assertion)
| Constructor with SubjectImpl instance. More...
| Proxy (const Proxy &aProxy)
| Copy constructor. More...
virtual | ~Proxy (void)
| Virtual destructor.
Proxy & | operator= (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 | ( | SubjectImpl * | aSubject | ) |
throw | ( | Assertion
| ) |  |

inline

Constructor with SubjectImpl instance.

Parameters

  SubjectImpl | pointer

template<class SubjectImpl >

corelinux::Proxy< SubjectImpl >::Proxy | ( | const Proxy< SubjectImpl > & | aProxy | ) |

inline

Copy constructor.

Parameters

  Proxy | const reference

## Member Function Documentation

template<class SubjectImpl >

virtual const SubjectImpl& corelinux::Proxy< SubjectImpl >::getSubject | ( | void |  | ) | const
throw | ( | Assertion
| ) |  |

inline virtual

Returns a reference to theSubjec.

Returns
  SubjectImpl const reference

Exceptions

  Assertion | if 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
| ) |  |

inline virtual

Operator dereference overload.

Returns
  SubjectImpl reference

Exceptions

  Assertion | if theSubject is NULLPTR

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

template<class SubjectImpl >

virtual SubjectImpl* corelinux::Proxy< SubjectImpl >::operator-> | ( | void |  | ) |

inline virtual

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

  Proxy | const 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

  Proxy | const reference

Returns
  bool if same

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

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

- Proxy.hpp

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