예제 #1
0
 /**
  * This constructor initializes the class with the specified parameters.
  *
  * @access public
  * @param Common\Mutable\IMap $blackboard                   the blackboard to be used
  * @param Common\Mutable\IMap $policy                       the policy associated with the task
  */
 public function __construct(Common\Mutable\IMap $blackboard = null, Common\Mutable\IMap $policy = null)
 {
     parent::__construct($blackboard, $policy);
     if (!$this->policy->hasKey('id')) {
         $this->policy->putEntry('id', __CLASS__);
     }
 }
예제 #2
0
 /**
  * This constructor initializes the class with the specified parameters.
  *
  * @access public
  * @param Common\Mutable\IMap $blackboard                   the blackboard to be used
  * @param Common\Mutable\IMap $policy                       the policy associated with the task
  */
 public function __construct(Common\Mutable\IMap $blackboard = null, Common\Mutable\IMap $policy = null)
 {
     parent::__construct($blackboard, $policy);
     if (!$this->policy->hasKey('reverse')) {
         // direction
         $this->policy->putEntry('reverse', false);
     }
     if (!$this->policy->hasKey('steps')) {
         $this->policy->putEntry('steps', 1);
     }
 }
예제 #3
0
 /**
  * This constructor initializes the class with the specified parameters.
  *
  * @access public
  * @param Common\Mutable\IMap $blackboard                   the blackboard to be used
  * @param Common\Mutable\IMap $policy                       the policy associated with the task
  */
 public function __construct(Common\Mutable\IMap $blackboard = null, Common\Mutable\IMap $policy = null)
 {
     parent::__construct($blackboard, $policy);
     if (!$this->policy->hasKey('callable')) {
         $this->policy->putEntry('callable', 'rand');
         // ['rand', 'mt_rand']
     }
     if (!$this->policy->hasKey('odds')) {
         $this->policy->putEntry('odds', 0.01);
     }
     if (!$this->policy->hasKey('options')) {
         $this->policy->putEntry('options', 100);
     }
 }
예제 #4
0
 /**
  * This constructor initializes the class with the specified parameters.
  *
  * @access public
  * @param Common\Mutable\IMap $blackboard                   the blackboard to be used
  * @param Common\Mutable\IMap $policy                       the policy associated with the task
  */
 public function __construct(Common\Mutable\IMap $blackboard = null, Common\Mutable\IMap $policy = null)
 {
     parent::__construct($blackboard, $policy);
     if ($this->policy->hasKey('until')) {
         $until = $this->policy->getValue('until');
         if (is_string($until)) {
             $until = BT\Task\Status::valueOf($until);
         }
         if ($until !== BT\Task\Status::SUCCESS) {
             $until = BT\Task\Status::FAILED;
         }
         $this->policy->putEntry('until', $until);
     } else {
         $this->policy->putEntry('until', BT\Task\Status::SUCCESS);
     }
 }
예제 #5
0
 /**
  * This constructor initializes the class with the specified parameters.
  *
  * @access public
  * @param Common\Mutable\IMap $blackboard                   the blackboard to be used
  * @param Common\Mutable\IMap $policy                       the policy associated with the task
  */
 public function __construct(Common\Mutable\IMap $blackboard = null, Common\Mutable\IMap $policy = null)
 {
     parent::__construct($blackboard, $policy);
     if (!$this->policy->hasKey('error')) {
         $this->policy->putEntry('error', false);
     }
     if (!$this->policy->hasKey('inactive')) {
         $this->policy->putEntry('inactive', false);
     }
     if (!$this->policy->hasKey('active')) {
         $this->policy->putEntry('acitve', false);
     }
     if (!$this->policy->hasKey('success')) {
         $this->policy->putEntry('success', true);
     }
 }
예제 #6
0
 /**
  * This destructor ensures that any resources are properly disposed.
  *
  * @access public
  */
 public function __destruct()
 {
     parent::__destruct();
     unset($this->counter);
 }
예제 #7
0
 /**
  * This destructor ensures that any resources are properly disposed.
  *
  * @access public
  */
 public function __destruct()
 {
     parent::__destruct();
     unset($this->next_time);
 }
예제 #8
0
 /**
  * This destructor ensures that any resources are properly disposed.
  *
  * @access public
  */
 public function __destruct()
 {
     parent::__destruct();
     unset($this->calls);
 }
예제 #9
0
 /**
  * This destructor ensures that any resources are properly disposed.
  *
  * @access public
  */
 public function __destruct()
 {
     parent::__destruct();
     unset($this->level);
     unset($this->logger);
 }