Ejemplo n.º 1
0
 /// <summary>
 /// LoadModel reloads the model from the model CONF file. Because the policy is
 /// attached to a model, so the policy is invalidated and needs to be reloaded by
 /// calling LoadPolicy().
 /// calling LoadPolicy().
 /// </summary>
 public void LoadModel()
 {
     model = NewModel();
     model.LoadModel(this.modelPath);
     fm = FunctionMap.LoadFunctionMap();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// creates a model.
 /// </summary>
 /// <returns></returns>
 public static Model NewModel()
 {
     Model.Model m = new Model.Model();
     return(m);
 }
Ejemplo n.º 3
0
 /// <summary>
 ///  creates a model.
 /// </summary>
 /// <param name="text"></param>
 /// <returns></returns>
 public static Model NewModel(String text)
 {
     Model.Model m = new Model.Model();
     m.LoadModelFromText(text);
     return(m);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// LoadModel reloads the model from the model CONF file. Because the policy is
 /// Attached to a model, so the policy is invalidated and needs to be reloaded by
 /// calling LoadPolicy().
 /// </summary>
 public void LoadModel()
 {
     model = NewModel();
     model.LoadModel(modelPath);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// sets the current model.
 /// </summary>
 /// <param name="model"> the model.</param>
 public void SetModel(Model model)
 {
     this.model = model;
     fm         = FunctionMap.LoadFunctionMap();
 }
Ejemplo n.º 6
0
        public static Model.Model NewModel()
        {
            var model = new Model.Model();

            return(model);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Sets the current model.
 /// </summary>
 /// <param name="model"></param>
 public void SetModel(Model.Model model)
 {
     this.model        = model;
     ExpressionHandler = new ExpressionHandler(model);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// sets the current model.
 /// </summary>
 /// <param name="model"> the model.</param>
 public void SetModel(Model.Model model)
 {
     this.model = model;
     fm         = FunctionMap.LoadFunctionMap();
     InitializeInterpreter();
 }
Ejemplo n.º 9
0
 public Enforcer(Model.Model m) :
     this(m, null)
 {
 }
Ejemplo n.º 10
0
 /// <summary>
 /// LoadModel reloads the model from the model CONF file. Because the policy is
 /// Attached to a model, so the policy is invalidated and needs to be reloaded by
 /// calling LoadPolicy().
 /// </summary>
 public void LoadModel()
 {
     model = NewModel();
     model.LoadModel(modelPath);
     functionMap = FunctionMap.LoadFunctionMap();
 }