00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #if !defined(ms_sec_task_INCLUDED_)
00022 #define ms_sec_task_INCLUDED_
00023
00024
00025
00026 #include <string>
00027 #include <set>
00028 #include <time.h>
00029 #include <vector>
00030
00031 namespace matrix_science {
00032
00037
00038
00050 class MS_MASCOTRESFILE_API ms_security_task
00051 {
00052 public:
00054
00062 enum paramType
00063 {
00064 TYPE_BOOL = 0x0000,
00065 TYPE_EQ_LONG = 0x0001,
00066 TYPE_LTE_LONG = 0x0002,
00067 TYPE_GTE_LONG = 0x0003,
00068 TYPE_LONG_ARRAY = 0x0004,
00069 TYPE_EQ_DOUBLE = 0x0005,
00070 TYPE_LTE_DOUBLE = 0x0006,
00071 TYPE_GTE_DOUBLE = 0x0007,
00072 TYPE_DOUBLE_ARRAY = 0x0008,
00073 TYPE_EQ_STRING = 0x0009,
00074 TYPE_STRING_ARRAY = 0x000A,
00075 TYPE_USERS_ARRAY = 0x000B,
00076 TYPE_ALL_USERS_ARRAY= 0x000C
00077 };
00078
00080 ms_security_task();
00081
00083 ~ms_security_task();
00084
00085
00086 ms_security_task(const ms_security_task& src);
00087
00088 #ifndef SWIG
00089
00090 ms_security_task& operator=(const ms_security_task& right);
00091 #endif
00092
00093 int getID() const;
00094
00096 void setID(const int id);
00097
00099 std::string getConstantName() const;
00100
00101 void setConstantName(const std::string value);
00102
00104 std::string getNotes() const;
00105
00106 void setNotes(const std::string value);
00107
00109 std::string getDescription() const;
00110
00111 void setDescription(const std::string value);
00112
00114 paramType getType() const;
00115
00116 void setType(const paramType value);
00117
00119 void clearParams();
00120
00122 void setParams(const std::string value);
00123
00125 bool addLongParam(const long value);
00126
00128 bool addDoubleParam(const double value);
00129
00131 bool addStringParam(const std::string value);
00132
00134 std::vector<long> getLongParams() const;
00135
00137 std::vector<double> getDoubleParams() const;
00138
00140 std::vector<std::string> getStringParams() const;
00141
00143 std::string getAllParamsAsString() const;
00144
00146 bool isPermitted() const;
00147
00149 bool isPermitted_long(const long value) const;
00150
00152 bool isPermitted_double(const double value) const;
00153
00155 bool isPermitted_string(const std::string value) const;
00156
00157 private:
00158 int id_;
00159 std::string description_;
00160 std::string notes_;
00161 std::string constantName_;
00162 paramType type_;
00163 std::set<long> longParams_;
00164 std::set<double> doubleParams_;
00165 std::set<std::string> stringParams_;
00166
00167 void copyFrom(const ms_security_task* src);
00168 };
00170 }
00171
00172 #endif // !defined(ms_sec_task_INCLUDED_)