OmniSciDB  c07336695a
OnTypesetMember< TYPE_SET > Class Template Reference

#include <SQLTypeUtilities.h>

Public Member Functions

 OnTypesetMember ()=delete
 
template<typename SQL_INFO_TYPE >
 OnTypesetMember (SQL_INFO_TYPE const &s)
 
template<typename SQL_INFO_TYPE , typename FUNCTOR_TYPE >
 OnTypesetMember (SQL_INFO_TYPE const &s, FUNCTOR_TYPE f)
 
template<typename SQL_INFO_TYPE , typename SUCCESS_FUNCTOR_TYPE , typename FAILURE_FUNCTOR_TYPE >
 OnTypesetMember (SQL_INFO_TYPE const &s, SUCCESS_FUNCTOR_TYPE success, FAILURE_FUNCTOR_TYPE failure)
 
template<typename SQL_INFO_TYPE , typename FUNCTOR_TYPE >
bool operator() (SQL_INFO_TYPE const &s, FUNCTOR_TYPE failure) const
 
template<typename SQL_INFO_TYPE , typename SUCCESS_FUNCTOR_TYPE , typename FAILURE_FUNCTOR_TYPE >
bool operator() (SQL_INFO_TYPE const &s, SUCCESS_FUNCTOR_TYPE success, FAILURE_FUNCTOR_TYPE failure) const
 
 operator bool () const
 

Private Member Functions

template<typename SQL_INFO_TYPE , SQLTypes TYPE>
bool internalResolveType (SQL_INFO_TYPE const &s) const
 
template<typename SQL_INFO_TYPE , SQLTypes TYPE, SQLTypes SECOND_TYPE, SQLTypes... REMAINING_TYPES>
bool internalResolveType (SQL_INFO_TYPE const &s) const
 

Private Attributes

bool const resolved_ = false
 

Detailed Description

template<SQLTypes... TYPE_SET>
class OnTypesetMember< TYPE_SET >

Definition at line 5 of file SQLTypeUtilities.h.

Constructor & Destructor Documentation

◆ OnTypesetMember() [1/4]

template<SQLTypes... TYPE_SET>
OnTypesetMember< TYPE_SET >::OnTypesetMember ( )
delete

◆ OnTypesetMember() [2/4]

template<SQLTypes... TYPE_SET>
template<typename SQL_INFO_TYPE >
OnTypesetMember< TYPE_SET >::OnTypesetMember ( SQL_INFO_TYPE const &  s)
inline

Definition at line 10 of file SQLTypeUtilities.h.

11  : resolved_(internalResolveType<SQL_INFO_TYPE, TYPE_SET...>(s)) {}
bool const resolved_

◆ OnTypesetMember() [3/4]

template<SQLTypes... TYPE_SET>
template<typename SQL_INFO_TYPE , typename FUNCTOR_TYPE >
OnTypesetMember< TYPE_SET >::OnTypesetMember ( SQL_INFO_TYPE const &  s,
FUNCTOR_TYPE  f 
)
inline

Definition at line 14 of file SQLTypeUtilities.h.

References OnTypesetMember< TYPE_SET >::resolved_.

15  : resolved_(internalResolveType<SQL_INFO_TYPE, TYPE_SET...>(s)) {
16  if (resolved_) {
17  f();
18  }
19  }
bool const resolved_

◆ OnTypesetMember() [4/4]

template<SQLTypes... TYPE_SET>
template<typename SQL_INFO_TYPE , typename SUCCESS_FUNCTOR_TYPE , typename FAILURE_FUNCTOR_TYPE >
OnTypesetMember< TYPE_SET >::OnTypesetMember ( SQL_INFO_TYPE const &  s,
SUCCESS_FUNCTOR_TYPE  success,
FAILURE_FUNCTOR_TYPE  failure 
)
inline

Definition at line 24 of file SQLTypeUtilities.h.

References OnTypesetMember< TYPE_SET >::resolved_.

27  : resolved_(internalResolveType<SQL_INFO_TYPE, TYPE_SET...>(s)) {
28  resolved_ ? success() : failure();
29  }
bool const resolved_

Member Function Documentation

◆ internalResolveType() [1/2]

template<SQLTypes... TYPE_SET>
template<typename SQL_INFO_TYPE , SQLTypes TYPE>
bool OnTypesetMember< TYPE_SET >::internalResolveType ( SQL_INFO_TYPE const &  s) const
inlineprivate

Definition at line 55 of file SQLTypeUtilities.h.

Referenced by OnTypesetMember< TYPE_SET >::internalResolveType(), and OnTypesetMember< TYPE_SET >::operator()().

55  {
56  if (s.get_type() == TYPE) {
57  return true;
58  }
59  return false;
60  }
+ Here is the caller graph for this function:

◆ internalResolveType() [2/2]

template<SQLTypes... TYPE_SET>
template<typename SQL_INFO_TYPE , SQLTypes TYPE, SQLTypes SECOND_TYPE, SQLTypes... REMAINING_TYPES>
bool OnTypesetMember< TYPE_SET >::internalResolveType ( SQL_INFO_TYPE const &  s) const
inlineprivate

Definition at line 66 of file SQLTypeUtilities.h.

References OnTypesetMember< TYPE_SET >::internalResolveType().

66  {
67  if (s.get_type() == TYPE) {
68  return true;
69  }
70  return internalResolveType<SQL_INFO_TYPE, SECOND_TYPE, REMAINING_TYPES...>(s);
71  }
bool internalResolveType(SQL_INFO_TYPE const &s) const
+ Here is the call graph for this function:

◆ operator bool()

template<SQLTypes... TYPE_SET>
OnTypesetMember< TYPE_SET >::operator bool ( ) const
inline

Definition at line 51 of file SQLTypeUtilities.h.

References OnTypesetMember< TYPE_SET >::resolved_.

51 { return resolved_; }
bool const resolved_

◆ operator()() [1/2]

template<SQLTypes... TYPE_SET>
template<typename SQL_INFO_TYPE , typename FUNCTOR_TYPE >
bool OnTypesetMember< TYPE_SET >::operator() ( SQL_INFO_TYPE const &  s,
FUNCTOR_TYPE  failure 
) const
inline

Definition at line 32 of file SQLTypeUtilities.h.

References OnTypesetMember< TYPE_SET >::internalResolveType().

32  {
33  bool resolved = internalResolveType<TYPE_SET...>(s);
34  if (resolved) {
35  failure();
36  }
37  return resolved;
38  }
bool internalResolveType(SQL_INFO_TYPE const &s) const
+ Here is the call graph for this function:

◆ operator()() [2/2]

template<SQLTypes... TYPE_SET>
template<typename SQL_INFO_TYPE , typename SUCCESS_FUNCTOR_TYPE , typename FAILURE_FUNCTOR_TYPE >
bool OnTypesetMember< TYPE_SET >::operator() ( SQL_INFO_TYPE const &  s,
SUCCESS_FUNCTOR_TYPE  success,
FAILURE_FUNCTOR_TYPE  failure 
) const
inline

Definition at line 43 of file SQLTypeUtilities.h.

References OnTypesetMember< TYPE_SET >::internalResolveType().

45  {
46  bool resolved = internalResolveType<SQL_INFO_TYPE, TYPE_SET...>(s);
47  resolved ? success() : failure();
48  return resolved;
49  }
bool internalResolveType(SQL_INFO_TYPE const &s) const
+ Here is the call graph for this function:

Member Data Documentation

◆ resolved_

template<SQLTypes... TYPE_SET>
bool const OnTypesetMember< TYPE_SET >::resolved_ = false
private

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