iRoCS Toolbox  1.1.0
RequireStData.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * Copyright (C) 2004-2015 Olaf Ronneberger, Florian Pigorsch, Jörg Mechnich,
4  * Thorsten Falk
5  *
6  * Image Analysis Lab, University of Freiburg, Germany
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  **************************************************************************/
23 
24 /**************************************************************************
25 ** Title:
26 ** $RCSfile$
27 ** $Revision: 4820 $$Name$
28 ** $Date: 2011-11-08 10:57:01 +0100 (Tue, 08 Nov 2011) $
29 ** Copyright: GPL $Author: tschmidt $
30 ** Description:
31 **
32 **
33 **
34 **-------------------------------------------------------------------------
35 **
36 ** $Log$
37 ** Revision 1.1 2004/08/26 08:36:59 ronneber
38 ** initital import
39 **
40 **
41 **
42 **************************************************************************/
43 
44 
45 #ifndef REQUIRESTDATA_HH
46 #define REQUIRESTDATA_HH
47 
48 #ifdef HAVE_CONFIG_H
49 #include <config.hh>
50 #endif
51 
52 #include <string>
53 #include <vector>
54 
55 #include "RequireHelpers.hh"
56 
57 namespace svt_check
58 {
59  template<typename STDATA>
61  {
62  public:
64  {
65  if(false)
66  {
67  STDATA s;
68 
69  s.setExceptionFlag(true);
70  bool b = s.exceptionFlag();
71 
72  b = s.valueExists( "");
73 
74  int i;
75  unsigned int ui;
76  float f;
77  double d;
78  std::string st;
79 
80  s.setValue( "", b );
81  s.setValue( "", i );
82  s.setValue( "", ui );
83  s.setValue( "", f );
84  s.setValue( "", d );
85  s.setValue( "", st );
86 
87  std::vector<double> v1;
88  std::vector<unsigned int> v2;
89  double* v3;
90  s.setArray( "", v1.begin(), ui );
91  s.setArray( "", v2.begin(), ui );
92  s.setArray( "", v3, ui );
93 
94 
95  s.getValue( "", b );
96  s.getValue( "", i );
97  s.getValue( "", ui );
98  s.getValue( "", f );
99  s.getValue( "", d );
100  s.getValue( "", st );
101 
102  ui = static_cast<unsigned int>(s.getArraySize( ""));
103 
104  s.getArray( "", v1.begin(), i );
105  s.getArray( "", v2.begin(), i );
106  s.getArray( "", v3, i );
107 
108  }
109  }
110  };
111 }
112 
113 
114 #endif