Construct version 5.4.4
An agent based modeling framework
dynet::Type_Interface< T > Class Template Reference

An interface for converting non-standard types. More...

Public Member Functions

 Type_Interface (T data)
 
template<typename S >
 operator S () const
 

Detailed Description

template<typename T>
class dynet::Type_Interface< T >

An interface for converting non-standard types.

This template class is primarily used by dynet::convert. A value is stored in the class and can then be type cast into boolean, integer, unsigned integer, float, or strings using a custom type casting declaration. Some small differences is the strict conversion of between boolean and strings and the requirement that a negative number throws an exception when converted to an unsigned integer.

Constructor & Destructor Documentation

◆ Type_Interface()

template<typename T >
dynet::Type_Interface< T >::Type_Interface ( data)
inline

summary>