Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_security_task.hpp
1/*
2##############################################################################
3# file: ms_security_task.hpp #
4# 'msparser' toolkit #
5# Encapsulates Mascot security as used in authentication #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2004 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11# $Archive:: /MowseBranches/ms_mascotresfile_1.2/include/ms_mascotresfi $ #
12# $Author: villek@matrixscience.com $ #
13# $Date: 2018-07-30 16:23:53 +0100 $ #
14# $Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_3_0_0-2024-09-24-0-g93ebaeb4f4 $ #
15# $NoKeywords:: $ #
16##############################################################################
17*/
18
19
20
21#if !defined(ms_sec_task_INCLUDED_)
22#define ms_sec_task_INCLUDED_
23
24
25// Includes from the standard template library
26#include <string>
27#include <set>
28#include <time.h>
29#include <vector>
30
31namespace matrix_science {
32
38
50 class MS_MASCOTRESFILE_API ms_security_task
51 {
52 public:
54
63 {
64 TYPE_BOOL = 0x0000,
65 TYPE_EQ_LONG = 0x0001,
66 TYPE_LTE_LONG = 0x0002,
67 TYPE_GTE_LONG = 0x0003,
68 TYPE_LONG_ARRAY = 0x0004,
69 TYPE_EQ_DOUBLE = 0x0005,
70 TYPE_LTE_DOUBLE = 0x0006,
71 TYPE_GTE_DOUBLE = 0x0007,
72 TYPE_DOUBLE_ARRAY = 0x0008,
73 TYPE_EQ_STRING = 0x0009,
74 TYPE_STRING_ARRAY = 0x000A,
75 TYPE_USERS_ARRAY = 0x000B,
76 TYPE_ALL_USERS_ARRAY= 0x000C
77 };
78
81
84
85 // Copying constructor for c++ programs - don't document
87
88#ifndef SWIG
89 // Assignment operator for c++ programs - don't document
90 ms_security_task& operator=(const ms_security_task& right);
91#endif
93 int getID() const;
94
96 void setID(const int id);
97
99 std::string getConstantName() const;
100
101 void setConstantName(const std::string value);
102
104 std::string getNotes() const;
105
106 void setNotes(const std::string value);
107
109 std::string getDescription() const;
110
111 void setDescription(const std::string value);
112
114 paramType getType() const;
115
116 void setType(const paramType value);
117
119 void clearParams();
120
122 void setParams(const std::string value);
123
125 bool addLongParam(const long value);
126
128 bool addDoubleParam(const double value);
129
131 bool addStringParam(const std::string value);
132
134 std::vector<long> getLongParams() const;
135
137 std::vector<double> getDoubleParams() const;
138
140 std::vector<std::string> getStringParams() const;
141
143 std::string getAllParamsAsString() const;
144
146 bool isPermitted() const;
147
149 bool isPermitted_long(const long value) const;
150
152 bool isPermitted_double(const double value) const;
153
155 bool isPermitted_string(const std::string value) const;
156
157 private:
158 int id_;
159 std::string description_;
160 std::string notes_;
161 std::string constantName_;
162 paramType type_;
163 std::set<long> longParams_;
164 std::set<double> doubleParams_;
165 std::set<std::string> stringParams_;
166
167 void copyFrom(const ms_security_task* src);
168 }; // end of security_group
170}
171
172#endif // !defined(ms_sec_task_INCLUDED_)
Each group has permission to do one or more tasks. This class defines an individual task.
Definition: ms_security_task.hpp:51
paramType
Definitions for parameter type.
Definition: ms_security_task.hpp:63