RequestOutputPlotFillsNodeClass.php 816 Bytes
<?php

define ("REQUESTOUTPUTPLOTFILLS_NAME", "fills");

abstract class RequestOutputPlotFillTypeEnum
{
	const SERIESERIE    = "serie-serie";
	const SERIECONSTANT = "serie-constant";
}

/**
 * @class RequestOutputPlotFillsNodeClass
 * @brief Definition of fills for a plot
 * @details
 */
class RequestOutputPlotFillsNodeClass extends NodeClass
{
	public function __construct()
	{
		parent::__construct(REQUESTOUTPUTPLOTFILLS_NAME);
	}
	
	public function addFill($type)
	{
		switch ($type)
		{
			case RequestOutputPlotFillTypeEnum::SERIECONSTANT :
				$node = new RequestOutputPlotFillSerieConstantNodeClass();
				break;
			case RequestOutputPlotFillTypeEnum::SERIESERIE :
			default :
				$node = new RequestOutputPlotFillSerieSerieNodeClass();
				break;
		}
		
		$this->addChild($node);
		return $node;
	}
}

?>