soma-io 6.0.6
datasourcecapabilities.h
Go to the documentation of this file.
1/* This software and supporting documentation are distributed by
2 * Institut Federatif de Recherche 49
3 * CEA/NeuroSpin, Batiment 145,
4 * 91191 Gif-sur-Yvette cedex
5 * France
6 *
7 * This software is governed by the CeCILL-B license under
8 * French law and abiding by the rules of distribution of free software.
9 * You can use, modify and/or redistribute the software under the
10 * terms of the CeCILL-B license as circulated by CEA, CNRS
11 * and INRIA at the following URL "http://www.cecill.info".
12 *
13 * As a counterpart to the access to the source code and rights to copy,
14 * modify and redistribute granted by the license, users are provided only
15 * with a limited warranty and the software's author, the holder of the
16 * economic rights, and the successive licensors have only limited
17 * liability.
18 *
19 * In this respect, the user's attention is drawn to the risks associated
20 * with loading, using, modifying and/or developing or reproducing the
21 * software by the user in light of its specific status of free software,
22 * that may mean that it is complicated to manipulate, and that also
23 * therefore means that it is reserved for developers and experienced
24 * professionals having in-depth computer knowledge. Users are therefore
25 * encouraged to load and test the software's suitability as regards their
26 * requirements in conditions enabling the security of their systems and/or
27 * data to be ensured and, more generally, to use and operate it in the
28 * same conditions as regards security.
29 *
30 * The fact that you are presently reading this means that you have had
31 * knowledge of the CeCILL-B license and that you accept its terms.
32 */
33
34#ifndef SOMAIO_DATASOURCEINFO_DATASOURCECAPABILITIES_H
35#define SOMAIO_DATASOURCEINFO_DATASOURCECAPABILITIES_H
36//--- soma-io ----------------------------------------------------------------
38//--- cartobase --------------------------------------------------------------
39#include <cartobase/smart/rcptr.h>
40//----------------------------------------------------------------------------
41
42namespace soma
43{
44 class DataSource;
45
60 {
61 public:
65
66 //======================================================================
67 // A C C E S S O R S
68 //======================================================================
69 bool allowsMemoryMapping() const;
70 bool isThreadSafe() const;
71 bool isOrdered() const;
72 bool canSeekVoxel() const;
73 bool canSeekLine() const;
74 bool canSeekSlice() const;
75 bool canSeekVolume() const;
77 bool canHandleStrides() const;
78
80
81 //======================================================================
82 // M U T A T O R S
83 //======================================================================
84 void setMemoryMapping ( const bool & boo = true );
85 void setThreadSafe ( const bool & boo = true );
86 void setOrdered ( const bool & boo = true );
87 void setSeekVoxel ( const bool & boo = true );
88 void setSeekLine ( const bool & boo = true );
89 void setSeekSlice ( const bool & boo = true );
90 void setSeekVolume ( const bool & boo = true );
91 void setRandomAccessEfficient( const bool & boo = true );
92 void setHandleStrides ( const bool & boo = true );
93
95
96 //======================================================================
97 // I N I T I A L I Z E D
98 //======================================================================
106 bool isInit() const;
107 void setInit( const bool & boo = true );
110 void reset();
111
112 protected:
125 unsigned int _capabilities;
129 };
130
131}
132
133#endif
void setDataSource(const carto::rc_ptr< DataSource > ds)
void setThreadSafe(const bool &boo=true)
void setRandomAccessEfficient(const bool &boo=true)
void setSeekLine(const bool &boo=true)
carto::rc_ptr< DataSource > _mds
In a case where memory mapping is allowed, it is necessary to tell the AllocatorContext which DataSou...
void setSeekSlice(const bool &boo=true)
void setSeekVolume(const bool &boo=true)
void setSeekVoxel(const bool &boo=true)
bool isRandomAccessEfficient() const
void setInit(const bool &boo=true)
void setMemoryMapping(const bool &boo=true)
void setOrdered(const bool &boo=true)
DataSourceCapabilities(const DataSourceCapabilities &)
bool isInit() const
Did we initialize the capabilities ?
void reset()
Sets the whole capabilities to its default value (including isInit() to false )
unsigned int _capabilities
From LSB to MSB :
carto::rc_ptr< DataSource > mappableDataSource() const
void setHandleStrides(const bool &boo=true)