/usr/include/varconf-1.0/varconf/dyncmp.h is in libvarconf-dev 1.0.0-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | /*
* dyncmp.h - interface for dynamically derived value container class compare
* Copyright (C) 2001, Ron Steinke
* (C) 2003-2004 Alistair Riddoch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: Joseph Zupko
* jaz147@psu.edu
*
* 189 Reese St.
* Old Forge, PA 18518
*/
#ifndef VARCONF_DYNCMP_H
#define VARCONF_DYNCMP_H
#include <varconf/variable.h>
#include <varconf/dynbase.h>
#include <string>
namespace varconf {
namespace dynvar {
class Compare : public Base {
public:
Compare() : Base(), m_v1(0), m_v2(0) {}
Compare(const Variable& v1, const Variable& v2) : Base(), m_v1(v1), m_v2(v2) {}
Compare(const Compare& c) : Base(c), m_v1(c.m_v1), m_v2(c.m_v2) {}
virtual ~Compare();
Compare& operator=(const Compare& c);
protected:
virtual void set_val();
virtual bool bool_cmp(const bool b1, const bool b2) = 0;
virtual bool int_cmp(const int i1, const int i2) = 0;
virtual bool double_cmp(const double d1, const double d2) = 0;
virtual bool string_cmp(const std::string& s1, const std::string& s2) = 0;
private:
Variable m_v1, m_v2;
};
class Equal : public Compare {
public:
Equal() : Compare() {}
Equal(const Variable& v1, const Variable& v2) : Compare(v1, v2) {}
Equal(const Equal& e) : Compare(e) {}
virtual ~Equal();
protected:
virtual bool bool_cmp(const bool b1, const bool b2);
virtual bool int_cmp(const int i1, const int i2);
virtual bool double_cmp(const double d1, const double d2);
virtual bool string_cmp(const std::string& s1, const std::string& s2);
};
class NotEq : public Compare {
public:
NotEq() : Compare() {}
NotEq(const Variable& v1, const Variable& v2) : Compare(v1, v2) {}
NotEq(const NotEq& e) : Compare(e) {}
virtual ~NotEq();
protected:
virtual bool bool_cmp(const bool b1, const bool b2);
virtual bool int_cmp(const int i1, const int i2);
virtual bool double_cmp(const double d1, const double d2);
virtual bool string_cmp(const std::string & s1, const std::string & s2);
};
class Greater : public Compare {
public:
Greater() : Compare() {}
Greater(const Variable& v1, const Variable& v2) : Compare(v1, v2) {}
Greater(const Greater& e) : Compare(e) {}
virtual ~Greater();
protected:
virtual bool bool_cmp(const bool b1, const bool b2);
virtual bool int_cmp(const int i1, const int i2);
virtual bool double_cmp(const double d1, const double d2);
virtual bool string_cmp(const std::string& s1, const std::string& s2);
};
class GreaterEq : public Compare {
public:
GreaterEq() : Compare() {}
GreaterEq(const Variable& v1, const Variable& v2) : Compare(v1, v2) {}
GreaterEq(const GreaterEq& e) : Compare(e) {}
virtual ~GreaterEq();
protected:
virtual bool bool_cmp(const bool b1, const bool b2);
virtual bool int_cmp(const int i1, const int i2);
virtual bool double_cmp(const double d1, const double d2);
virtual bool string_cmp(const std::string& s1, const std::string& s2);
};
class Less : public Compare {
public:
Less() : Compare() {}
Less(const Variable& v1, const Variable& v2) : Compare(v1, v2) {}
Less(const Less& e) : Compare(e) {}
virtual ~Less();
protected:
virtual bool bool_cmp(const bool b1, const bool b2);
virtual bool int_cmp(const int i1, const int i2);
virtual bool double_cmp(const double d1, const double d2);
virtual bool string_cmp(const std::string& s1, const std::string& s2);
};
class LessEq : public Compare {
public:
LessEq() : Compare() {}
LessEq(const Variable& v1, const Variable& v2) : Compare(v1, v2) {}
LessEq(const LessEq& e) : Compare(e) {}
virtual ~LessEq();
protected:
virtual bool bool_cmp(const bool b1, const bool b2);
virtual bool int_cmp(const int i1, const int i2);
virtual bool double_cmp(const double d1, const double d2);
virtual bool string_cmp(const std::string& s1, const std::string& s2);
};
}} // namespace varconf::dynvar
#endif
|