GeoModel - GeoModelCore
Public Member Functions | Private Attributes | List of all members
Query< T > Class Template Reference

This class can be used to return the result of a query that can fail. Objects of this class can convert themselves to the result type T. Client code can check for a valid result; if it doesn't, and the result is valid, no problem. But if the result is invalid you will print an error message and terminate. More...

#include <Query.h>

Public Member Functions

 Query (const T &)
 
 operator T () const
 
bool isValid () const
 

Private Attributes

bool m_failed
 
T m_instance
 

Detailed Description

template<class T>
class Query< T >

This class can be used to return the result of a query that can fail. Objects of this class can convert themselves to the result type T. Client code can check for a valid result; if it doesn't, and the result is valid, no problem. But if the result is invalid you will print an error message and terminate.

Joe Boudreau based on Barton & Nackman's "Scientific and Engineering C++"

Definition at line 22 of file Query.h.


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