bbstd::StringTo< T > Class Template Reference

#include <bbstdStringTo.h>

List of all members.

Public Member Functions

template<>
void DoIt ()
template<>
void DoIt ()
template<>
void DoIt ()
template<>
void DoIt ()
template<>
void DoIt ()
template<>
void DoIt ()
template<>
void DoIt ()
template<>
void DoIt ()
template<>
void DoIt ()
template<>
void DoIt ()

Private Member Functions

 BBTK_TEMPLATE_BLACK_BOX_INTERFACE (StringTo, bbtk::AtomicBlackBox, T)
 BBTK_DECLARE_INPUT (In, std::string)
 BBTK_DECLARE_OUTPUT (Out, T)
 BBTK_PROCESS (DoIt)
void DoIt ()


Detailed Description

template<class T>
class bbstd::StringTo< T >

Definition at line 42 of file bbstdStringTo.h.


Member Function Documentation

template<class T>
bbstd::StringTo< T >::BBTK_TEMPLATE_BLACK_BOX_INTERFACE ( StringTo< T >  ,
bbtk::AtomicBlackBox  ,
 
) [private]

template<class T>
bbstd::StringTo< T >::BBTK_DECLARE_INPUT ( In  ,
std::string   
) [private]

template<class T>
bbstd::StringTo< T >::BBTK_DECLARE_OUTPUT ( Out  ,
 
) [private]

template<class T>
bbstd::StringTo< T >::BBTK_PROCESS ( DoIt   )  [private]

template<class T>
void bbstd::StringTo< T >::DoIt (  )  [private]

template<>
void bbstd::StringTo< bool >::DoIt (  )  [inline]

Definition at line 46 of file bbstdStringTo.cxx.

00047   {
00048     if ( (bbGetInputIn()=="true") || 
00049          (bbGetInputIn()=="TRUE") || 
00050          (bbGetInputIn()=="True") || 
00051          (bbGetInputIn()=="1")     )  
00052     {
00053        bbSetOutputOut(true);
00054     }
00055     else if ( (bbGetInputIn()=="false") || 
00056               (bbGetInputIn()=="FALSE") ||
00057               (bbGetInputIn()=="False") ||
00058               (bbGetInputIn()=="0") )  
00059     {   
00060        bbSetOutputOut(false); 
00061     }
00062     else 
00063     {
00064        bbtkError("cannot convert '"<<bbGetInputIn()<<"' to a bool");
00065     }
00066   }

template<>
void bbstd::StringTo< bbtk::Void >::DoIt (  )  [inline]

Definition at line 69 of file bbstdStringTo.cxx.

00070   {
00071   }

template<>
void bbstd::StringTo< int8_t >::DoIt (  )  [inline]

Definition at line 73 of file bbstdStringTo.cxx.

00074   {
00075     bbSetOutputOut( (int8_t)atoi ( bbGetInputIn().c_str() ) );
00076   }

template<>
void bbstd::StringTo< uint8_t >::DoIt (  )  [inline]

Definition at line 78 of file bbstdStringTo.cxx.

00079   {
00080     bbSetOutputOut( (uint8_t)atoi ( bbGetInputIn().c_str() ) );
00081   }

template<>
void bbstd::StringTo< int16_t >::DoIt (  )  [inline]

Definition at line 83 of file bbstdStringTo.cxx.

00084   {
00085     bbSetOutputOut( (int16_t)atoi ( bbGetInputIn().c_str() ) );
00086   }

template<>
void bbstd::StringTo< uint16_t >::DoIt (  )  [inline]

Definition at line 88 of file bbstdStringTo.cxx.

00089   {
00090     bbSetOutputOut( (uint16_t)atoi ( bbGetInputIn().c_str() ) );
00091   }

template<>
void bbstd::StringTo< int32_t >::DoIt (  )  [inline]

Definition at line 93 of file bbstdStringTo.cxx.

00094   {
00095     bbSetOutputOut( (int32_t)atoi ( bbGetInputIn().c_str() ) );
00096   }

template<>
void bbstd::StringTo< uint32_t >::DoIt (  )  [inline]

Definition at line 98 of file bbstdStringTo.cxx.

00099   {
00100     bbSetOutputOut( (uint32_t)atoi ( bbGetInputIn().c_str() ) );
00101   }

template<>
void bbstd::StringTo< float >::DoIt (  )  [inline]

Definition at line 103 of file bbstdStringTo.cxx.

00104   {
00105     bbSetOutputOut( (float)atof ( bbGetInputIn().c_str() ) );
00106   }

template<>
void bbstd::StringTo< double >::DoIt (  )  [inline]

Definition at line 108 of file bbstdStringTo.cxx.

00109   {
00110     bbSetOutputOut( atof ( bbGetInputIn().c_str() ) );
00111   }


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

Generated on Tue Oct 21 16:06:51 2008 for std by  doxygen 1.5.6