go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
xoutrow.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright UMC Utrecht and contributors
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __xoutrow_h
19 #define __xoutrow_h
20 
21 #include "xoutbase.h"
22 #include "xoutcell.h"
23 #include <sstream>
24 
25 namespace xoutlibrary
26 {
27 using namespace std;
28 
41 template< class charT, class traits = char_traits< charT > >
42 class xoutrow : public xoutbase< charT, traits >
43 {
44 public:
45 
46  typedef xoutrow Self;
48 
51  typedef typename Superclass::char_type char_type;
52  typedef typename Superclass::int_type int_type;
53  typedef typename Superclass::pos_type pos_type;
54  typedef typename Superclass::off_type off_type;
56  typedef typename Superclass::ios_type ios_type;
57 
64 
67 
70 
72  ~xoutrow() override;
73 
77  void WriteBufferedData( void ) override;
78 
83  virtual void WriteHeaders( void );
84 
86  int AddTargetCell( const char * name ) override;
87 
89  int RemoveTargetCell( const char * name ) override;
90 
94  void SetTargetCells( const XStreamMapType & cellmap ) override;
95 
100  int AddOutput( const char * name, ostream_type * output ) override;
101 
102  int AddOutput( const char * name, Superclass * output ) override;
103 
104  int RemoveOutput( const char * name ) override;
105 
106  void SetOutputs( const CStreamMapType & outputmap ) override;
107 
108  void SetOutputs( const XStreamMapType & outputmap ) override;
109 
110 protected:
111 
116  Superclass & SelectXCell( const char * name ) override;
117 
119 
120 };
121 
122 } // end namespace xoutlibrary
123 
124 #include "xoutrow.hxx"
125 
126 #endif // end #ifndef __xoutrow_h
Base class for xout.
Definition: xoutbase.h:48
traits::off_type off_type
Definition: xoutbase.h:58
XStreamMapType::iterator XStreamMapIteratorType
Definition: xoutbase.h:65
XStreamMapType::value_type XStreamMapEntryType
Definition: xoutbase.h:67
CStreamMapType::iterator CStreamMapIteratorType
Definition: xoutbase.h:64
CStreamMapType::value_type CStreamMapEntryType
Definition: xoutbase.h:66
traits::pos_type pos_type
Definition: xoutbase.h:57
basic_ios< charT, traits > ios_type
Definition: xoutbase.h:60
basic_ostream< charT, traits > ostream_type
Definition: xoutbase.h:59
std::map< std::string, ostream_type * > CStreamMapType
Definition: xoutbase.h:62
std::map< std::string, Self * > XStreamMapType
Definition: xoutbase.h:63
traits::int_type int_type
Definition: xoutbase.h:56
Stores the input in a string stream.
Definition: xoutcell.h:40
The xoutrow class can easily generate tables.
Definition: xoutrow.h:43
void WriteBufferedData(void) override
void SetTargetCells(const XStreamMapType &cellmap) override
XStreamMapType m_CellMap
Definition: xoutrow.h:118
Superclass::XStreamMapType XStreamMapType
Definition: xoutrow.h:59
xoutbase< charT, traits > Superclass
Definition: xoutrow.h:47
void SetOutputs(const XStreamMapType &outputmap) override
Superclass::off_type off_type
Definition: xoutrow.h:54
int RemoveOutput(const char *name) override
int AddOutput(const char *name, Superclass *output) override
Superclass::traits_type traits_type
Definition: xoutrow.h:50
xoutcell< charT, traits > XOutCellType
Definition: xoutrow.h:66
Superclass::ios_type ios_type
Definition: xoutrow.h:56
int RemoveTargetCell(const char *name) override
Superclass::ostream_type ostream_type
Definition: xoutrow.h:55
Superclass::CStreamMapEntryType CStreamMapEntryType
Definition: xoutrow.h:62
Superclass::pos_type pos_type
Definition: xoutrow.h:53
Superclass::CStreamMapType CStreamMapType
Definition: xoutrow.h:58
Superclass::XStreamMapEntryType XStreamMapEntryType
Definition: xoutrow.h:63
Superclass::CStreamMapIteratorType CStreamMapIteratorType
Definition: xoutrow.h:60
Superclass & SelectXCell(const char *name) override
Superclass::XStreamMapIteratorType XStreamMapIteratorType
Definition: xoutrow.h:61
int AddTargetCell(const char *name) override
Superclass::int_type int_type
Definition: xoutrow.h:52
virtual void WriteHeaders(void)
Superclass::char_type char_type
Definition: xoutrow.h:51
int AddOutput(const char *name, ostream_type *output) override
void SetOutputs(const CStreamMapType &outputmap) override


Generated on 1667476801 for elastix by doxygen 1.9.1 elastix logo