CiftiLib
A C++ library for CIFTI-2 and CIFTI-1 files
CiftiVersion.h
1#ifndef __CIFTI_VERSION_H__
2#define __CIFTI_VERSION_H__
3
4/*LICENSE_START*/
5/*
6 * Copyright (c) 2014, Washington University School of Medicine
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without modification,
10 * are permitted provided that the following conditions are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * 2. Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#include "Common/AString.h"
32
33#include "stdint.h"
34
35namespace cifti
36{
38 {
39 int16_t m_major, m_minor;
40 public:
41 int16_t getMajor() const { return m_major; }
42 int16_t getMinor() const { return m_minor; }
43
45 CiftiVersion(const int16_t& major, const int16_t& minor);
46 CiftiVersion(const AString& versionString);
47 AString toString() const;
48 bool operator<(const CiftiVersion& rhs) const;
49 bool operator>(const CiftiVersion& rhs) const;
50 bool operator==(const CiftiVersion& rhs) const;
51 bool operator!=(const CiftiVersion& rhs) const;
52 bool operator<=(const CiftiVersion& rhs) const;
53 bool operator>=(const CiftiVersion& rhs) const;
55 bool hasReversedFirstDims() const;
56 };
57}
58
59#endif //__CIFTI_VERSION_H__
Definition CiftiVersion.h:38
bool hasReversedFirstDims() const
quirk tests
Definition CiftiVersion.cxx:85
namespace for all CiftiLib functionality
Definition CiftiBrainModelsMap.h:42