property_flags.hh
Go to the documentation of this file.
/* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
*
* MIA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef mia_core_property_flags_hh
#define mia_core_property_flags_hh
#include <set>
#include <mia/core/defines.hh>
NS_MIA_BEGIN
extern EXPORT_CORE const char *property_gradient;
class EXPORT_CORE CPropertyFlagHolder
{
public:
typedef std::set<const char *> Set;
virtual ~CPropertyFlagHolder();
bool has(const char *property) const;
void add(const char *property);
bool has_all_in(const CPropertyFlagHolder& testset)const;
Set get_missing_properties(const CPropertyFlagHolder& testset)const;
private:
virtual bool do_has(const char *property) const;
Set m_properties;
};
NS_MIA_END
#endif
CPropertyFlagHolder
This class holds a set of properties.
Definition property_flags.hh:42
CPropertyFlagHolder::has_all_in
bool has_all_in(const CPropertyFlagHolder &testset) const
CPropertyFlagHolder::add
void add(const char *property)
CPropertyFlagHolder::has
bool has(const char *property) const
CPropertyFlagHolder::get_missing_properties
Set get_missing_properties(const CPropertyFlagHolder &testset) const
CPropertyFlagHolder::Set
std::set< const char * > Set
define the type of the set of flags
Definition property_flags.hh:45
CPropertyFlagHolder::~CPropertyFlagHolder
virtual ~CPropertyFlagHolder()
defines.hh
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
EXPORT_CORE
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
Definition defines.hh:101
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36
property_gradient
EXPORT_CORE const char * property_gradient
constant defining the gradient property