Program Listing for File AllowedGridGrowth.h¶
↰ Return to documentation for file (/home/kpenev/projects/git/poet/poet_src/StellarEvolution/AllowedGridGrowth.h)
#ifndef __ALLOWED_GRID_GROWTH_H
#define __ALLOWED_GRID_GROWTH_H
#include "../Core/SharedLibraryExportMacros.h"
namespace StellarEvolution {
class LIB_LOCAL AllowedGridGrowth {
private:
bool
__lighter,
__heavier,
__poorer,
__richer;
public:
AllowedGridGrowth() :
__lighter(true), __heavier(true), __poorer(true), __richer(true)
{}
bool lighter() const {return __lighter;}
bool heavier() const {return __heavier;}
bool poorer() const {return __poorer;}
bool richer() const {return __richer;}
AllowedGridGrowth &block_lighter() {__lighter = false; return *this;}
AllowedGridGrowth &block_heavier() {__heavier = false; return *this;}
AllowedGridGrowth &block_poorer() {__poorer = false; return *this;}
AllowedGridGrowth &block_richer() {__richer = false; return *this;}
operator bool() const
{return __lighter || __heavier || __poorer || __richer;}
}; //End AllowedGridGrowth class declaration.
} //End StellarEvolution namespace.
#endif