@@ -50,50 +50,50 @@ class Enforcer : public IEnforcer{
5050 /* *
5151 * Enforcer is the default constructor.
5252 */
53- static unique_ptr< Enforcer> NewEnforcer ();
53+ Enforcer ();
5454 /* *
5555 * Enforcer initializes an enforcer with a model file and a policy file.
5656 *
5757 * @param model_path the path of the model file.
58- * @param policyFile the path of the policy file.
58+ * @param policy_file the path of the policy file.
5959 */
60- static unique_ptr< Enforcer> NewEnforcer (string model_path, string policyFile );
60+ Enforcer (string model_path, string policy_file );
6161 /* *
6262 * Enforcer initializes an enforcer with a database adapter.
6363 *
6464 * @param model_path the path of the model file.
6565 * @param adapter the adapter.
6666 */
67- static unique_ptr< Enforcer> NewEnforcer (string model_path, shared_ptr<Adapter> adapter);
67+ Enforcer (string model_path, shared_ptr<Adapter> adapter);
6868 /* *
6969 * Enforcer initializes an enforcer with a model and a database adapter.
7070 *
7171 * @param m the model.
7272 * @param adapter the adapter.
7373 */
74- static unique_ptr< Enforcer> NewEnforcer (shared_ptr<Model> m, shared_ptr<Adapter> adapter);
74+ Enforcer (shared_ptr<Model> m, shared_ptr<Adapter> adapter);
7575 /* *
7676 * Enforcer initializes an enforcer with a model.
7777 *
7878 * @param m the model.
7979 */
80- static unique_ptr< Enforcer> NewEnforcer (shared_ptr<Model> m);
80+ Enforcer (shared_ptr<Model> m);
8181 /* *
8282 * Enforcer initializes an enforcer with a model file.
8383 *
8484 * @param model_path the path of the model file.
8585 */
86- static unique_ptr< Enforcer> NewEnforcer (string model_path);
86+ Enforcer (string model_path);
8787 /* *
8888 * Enforcer initializes an enforcer with a model file, a policy file and an enable log flag.
8989 *
9090 * @param model_path the path of the model file.
91- * @param policyFile the path of the policy file.
92- * @param enableLog whether to enable Casbin's log.
91+ * @param policy_file the path of the policy file.
92+ * @param enable_log whether to enable Casbin's log.
9393 */
94- static unique_ptr< Enforcer> NewEnforcer (string model_path, string policyFile , bool enableLog );
94+ Enforcer (string model_path, string policy_file , bool enable_log );
9595 // InitWithFile initializes an enforcer with a model file and a policy file.
96- void InitWithFile (string model_path, string policyPath );
96+ void InitWithFile (string model_path, string policy_path );
9797 // InitWithAdapter initializes an enforcer with a database adapter.
9898 void InitWithAdapter (string model_path, shared_ptr<Adapter> adapter);
9999 // InitWithModelAndAdapter initializes an enforcer with a model and a database adapter.
@@ -161,45 +161,45 @@ class Enforcer : public IEnforcer{
161161
162162 /* Management API member functions.*/
163163 vector<string> GetAllSubjects ();
164- vector<string> GetAllNamedSubjects (string ptype );
164+ vector<string> GetAllNamedSubjects (string p_type );
165165 vector<string> GetAllObjects ();
166- vector<string> GetAllNamedObjects (string ptype );
166+ vector<string> GetAllNamedObjects (string p_type );
167167 vector<string> GetAllActions ();
168- vector<string> GetAllNamedActions (string ptype );
168+ vector<string> GetAllNamedActions (string p_type );
169169 vector<string> GetAllRoles ();
170- vector<string> GetAllNamedRoles (string ptype );
170+ vector<string> GetAllNamedRoles (string p_type );
171171 vector<vector<string>> GetPolicy ();
172172 vector<vector<string>> GetFilteredPolicy (int field_index, vector<string> field_values);
173- vector<vector<string>> GetNamedPolicy (string ptype );
174- vector<vector<string>> GetFilteredNamedPolicy (string ptype , int field_index, vector<string> field_values);
173+ vector<vector<string>> GetNamedPolicy (string p_type );
174+ vector<vector<string>> GetFilteredNamedPolicy (string p_type , int field_index, vector<string> field_values);
175175 vector<vector<string>> GetGroupingPolicy ();
176176 vector<vector<string>> GetFilteredGroupingPolicy (int field_index, vector<string> field_values);
177- vector<vector<string>> GetNamedGroupingPolicy (string ptype );
178- vector<vector<string>> GetFilteredNamedGroupingPolicy (string ptype , int field_index, vector<string> field_values);
177+ vector<vector<string>> GetNamedGroupingPolicy (string p_type );
178+ vector<vector<string>> GetFilteredNamedGroupingPolicy (string p_type , int field_index, vector<string> field_values);
179179 bool HasPolicy (vector<string> params);
180- bool HasNamedPolicy (string ptype , vector<string> params);
180+ bool HasNamedPolicy (string p_type , vector<string> params);
181181 bool AddPolicy (vector<string> params);
182182 bool AddPolicies (vector<vector<string>> rules);
183- bool AddNamedPolicy (string ptype , vector<string> params);
183+ bool AddNamedPolicy (string p_type , vector<string> params);
184184 bool AddNamedPolicies (string p_type, vector<vector<string>> rules);
185185 bool RemovePolicy (vector<string> params);
186186 bool RemovePolicies (vector<vector<string>> rules);
187187 bool RemoveFilteredPolicy (int field_index, vector<string> field_values);
188- bool RemoveNamedPolicy (string ptype , vector<string> params);
188+ bool RemoveNamedPolicy (string p_type , vector<string> params);
189189 bool RemoveNamedPolicies (string p_type, vector<vector<string>> rules);
190- bool RemoveFilteredNamedPolicy (string ptype , int field_index, vector<string> field_values);
190+ bool RemoveFilteredNamedPolicy (string p_type , int field_index, vector<string> field_values);
191191 bool HasGroupingPolicy (vector<string> params);
192- bool HasNamedGroupingPolicy (string ptype , vector<string> params);
192+ bool HasNamedGroupingPolicy (string p_type , vector<string> params);
193193 bool AddGroupingPolicy (vector<string> params);
194194 bool AddGroupingPolicies (vector<vector<string>> rules);
195- bool AddNamedGroupingPolicy (string ptype , vector<string> params);
195+ bool AddNamedGroupingPolicy (string p_type , vector<string> params);
196196 bool AddNamedGroupingPolicies (string p_type, vector<vector<string>> rules);
197197 bool RemoveGroupingPolicy (vector<string> params);
198198 bool RemoveGroupingPolicies (vector<vector<string>> rules);
199199 bool RemoveFilteredGroupingPolicy (int field_index, vector<string> field_values);
200- bool RemoveNamedGroupingPolicy (string ptype , vector<string> params);
200+ bool RemoveNamedGroupingPolicy (string p_type , vector<string> params);
201201 bool RemoveNamedGroupingPolicies (string p_type, vector<vector<string>> rules);
202- bool RemoveFilteredNamedGroupingPolicy (string ptype , int field_index, vector<string> field_values);
202+ bool RemoveFilteredNamedGroupingPolicy (string p_type , int field_index, vector<string> field_values);
203203 void AddFunction (string name, Function function, Index nargs);
204204
205205 /* RBAC API member functions.*/
@@ -223,11 +223,11 @@ class Enforcer : public IEnforcer{
223223 bool DeletePermission (vector<string> permission);
224224
225225 /* Internal API member functions */
226- bool addPolicy (string sec, string ptype , vector<string> rule);
226+ bool addPolicy (string sec, string p_type , vector<string> rule);
227227 bool addPolicies (string sec, string p_type, vector<vector<string>> rules);
228- bool removePolicy (string sec , string ptype , vector<string> rule);
228+ bool removePolicy (string sec , string p_type , vector<string> rule);
229229 bool removePolicies (string sec, string p_type, vector<vector<string>> rules);
230- bool removeFilteredPolicy (string sec , string ptype , int fieldIndex , vector<string> fieldValues );
230+ bool removeFilteredPolicy (string sec , string p_type , int field_index , vector<string> field_values );
231231
232232 /* RBAC API with domains.*/
233233 vector<string> GetUsersForRoleInDomain (string name, string domain = {});
0 commit comments