Vcsn  2.4
Be Rational
vcsn::detail::down_caster Struct Reference

A functor that captures the current location (to report errors), and provides "cast". More...

#include <cast.hh>

Collaboration diagram for vcsn::detail::down_caster:

Public Member Functions

 down_caster (const char *f, int l)
 
template<typename T , typename U >
void error (const char *msg)
 
template<typename T , typename U >
cast (U t)
 
template<typename T , typename U >
std::shared_ptr< T > cast (std::shared_ptr< U > t)
 Special case for shared_ptr. More...
 

Public Attributes

const charfile
 
int line
 

Detailed Description

A functor that captures the current location (to report errors), and provides "cast".

Definition at line 24 of file cast.hh.

Constructor & Destructor Documentation

vcsn::detail::down_caster::down_caster ( const char f,
int  l 
)
inline

Definition at line 26 of file cast.hh.

Member Function Documentation

template<typename T , typename U >
T vcsn::detail::down_caster::cast ( t)
inline

Definition at line 45 of file cast.hh.

References vcsn::res.

template<typename T , typename U >
std::shared_ptr<T> vcsn::detail::down_caster::cast ( std::shared_ptr< U >  t)
inline

Special case for shared_ptr.

Definition at line 58 of file cast.hh.

References vcsn::res.

template<typename T , typename U >
void vcsn::detail::down_caster::error ( const char msg)
inline

Definition at line 34 of file cast.hh.

Member Data Documentation

const char* vcsn::detail::down_caster::file

Definition at line 29 of file cast.hh.

int vcsn::detail::down_caster::line

Definition at line 30 of file cast.hh.


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