GTIRB  v2.2.0
GrammaTech Intermediate Representation for Binaries: C++ API
Namespaces | 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.

Namespaces

 gtirb
 Main namespace for the GTIRB API.
 

Functions

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

Detailed Description

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

See also
Casting.