proxy_pattern::Proxy
-
class Proxy : public proxy_pattern::Subject
The Proxy controls access to the RealSubject.
The Proxy adds additional functionality such as authentication or lazy initialization.
Public Functions
-
inline explicit Proxy(bool isAuthenticated)
Constructor initializes the Proxy with authentication status.
- Parameters:
isAuthenticated – Whether the client is authenticated.
-
inline virtual void request(const std::string &resource) const override
Handles the request by checking authentication and delegating to RealSubject.
- Parameters:
resource – The resource being requested.
-
inline explicit Proxy(bool isAuthenticated)