GTIRB  v2.1.0
GrammaTech Intermediate Representation for Binaries: C++ API
Functions
Casting.hpp File Reference

The various casting and type checking operations that apply to gtirb::Node subclasses. More...

#include <cassert>
#include <type_traits>
Include dependency graph for Casting.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class X , class Y >
std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type cast (const Y &Val)
 
template<class X , class Y >
cast_retty< X, Y >::ret_type cast (Y &Val)
 
template<class X , class Y >
cast_retty< X, Y * >::ret_type cast (Y *Val)
 
template<class X , class Y >
std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type cast_or_null (const Y &Val)
 
template<class X , class Y >
std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, Y >::ret_type >::type cast_or_null (Y &Val)
 
template<class X , class Y >
cast_retty< X, Y * >::ret_type cast_or_null (Y *Val)
 
template<class X , class Y >
std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast (const Y &Val)
 
template<class X , class Y >
cast_retty< X, Y >::ret_type dyn_cast (Y &Val)
 
template<class X , class Y >
cast_retty< X, Y * >::ret_type dyn_cast (Y *Val)
 
template<class X , class Y >
std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast_or_null (const Y &Val)
 
template<class X , class Y >
std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, Y >::ret_type >::type dyn_cast_or_null (Y &Val)
 
template<class X , class Y >
cast_retty< X, Y * >::ret_type dyn_cast_or_null (Y *Val)
 
template<class X , class Y >
bool isa (const Y &Val)
 

Detailed Description

The various casting and type checking operations that apply to gtirb::Node subclasses.

See also
Casting.

Function Documentation

◆ cast() [1/3]

template<class X , class Y >
cast ( const Y &  Val)
inline

See cast<Ty>.

◆ cast() [2/3]

template<class X , class Y >
cast ( Y &  Val)
inline

See cast<Ty>.

◆ cast() [3/3]

template<class X , class Y >
cast ( Y *  Val)
inline

See cast<Ty>.

◆ cast_or_null() [1/3]

template<class X , class Y >
cast_or_null ( const Y &  Val)
inline

◆ cast_or_null() [2/3]

template<class X , class Y >
cast_or_null ( Y &  Val)
inline

◆ cast_or_null() [3/3]

template<class X , class Y >
cast_or_null ( Y *  Val)
inline

◆ dyn_cast() [1/3]

template<class X , class Y >
dyn_cast ( const Y &  Val)
inline

◆ dyn_cast() [2/3]

template<class X , class Y >
dyn_cast ( Y &  Val)
inline

◆ dyn_cast() [3/3]

template<class X , class Y >
dyn_cast ( Y *  Val)
inline

◆ dyn_cast_or_null() [1/3]

template<class X , class Y >
dyn_cast_or_null ( const Y &  Val)
inline

◆ dyn_cast_or_null() [2/3]

template<class X , class Y >
dyn_cast_or_null ( Y &  Val)
inline

◆ dyn_cast_or_null() [3/3]

template<class X , class Y >
dyn_cast_or_null ( Y *  Val)
inline

◆ isa()

template<class X , class Y >
isa ( const Y &  Val)
inline

See isa<Ty>.