Alpha.hpp

Demonstrates the introduction of a new type Alpha, that can be passed through the vish network.

See also:
Related: - Alpha.cpp - DataSource.hpp - DataFilter.hpp - Beat.hpp
00001 #ifndef __TUTORIAL_ALPHABETA_ALPHA_HPP
00002 #define __TUTORIAL_ALPHABETA_ALPHA_HPP
00003 
00004 #include <ocean/plankton/VValue.hpp>
00005 
00006 #include "api.h"
00007 
00019 namespace AlphaBeta
00020 {
00021 
00022 
00023 struct  MYAPI Alpha // The Alpha type. We don't have content here, it is just for demonstration.
00024 {
00025 
00026 };
00027 
00028 }
00029 
00030 namespace Wizt
00031 {
00032         /*
00033           VISH provides generic I/O for input types via text.
00034           As such, we need to provide the information how to
00035           convert an Alpha type from and to text. This is done
00036           via a Type Trait class.
00037 
00038           In this case, the conversion functions always return
00039           false, indicating that no conversion was possible.
00040           We don't need that here, since the types are empty
00041           and have no state to save or load at all.
00042          */
00043         template <> 
00044         class MYAPI VValueTrait< ::AlphaBeta::Alpha>
00045         {
00046         public:
00047                 
00048         static  bool setValueFromText( ::AlphaBeta::Alpha&i, const string&s);
00049 
00050         static  string Text(const  ::AlphaBeta::Alpha&);
00051         };
00052 }
00053 
00054 
00055 #endif // __TUTORIAL_ALPHABETA_ALPHA_HPP
00056 

Generated on Thu Apr 2 18:58:47 2009 for VISHTutorial by  doxygen 1.4.7