Ejemplo n.º 1
0
        public OperatorDim(DimensionOperator op, BaseDim left, BaseDim right)
        {
            d_left = left != null?left.Clone() : null;

            d_right = right != null?right.Clone() : null;

            d_op = op;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// set the current value for this Dimension.
        /// </summary>
        /// <param name="dim">
        /// object based on a subclass of BaseDim which holds the dimensional value.
        /// </param>
        public void SetBaseDimension(BaseDim dim)
        {
            // TODO: ...
            // release old value, if any.
            //if (d_value)
            //    CEGUI_DELETE_AO d_value;

            _value = dim.Clone();
        }
Ejemplo n.º 3
0
 //! helper to set the next free operand, will throw after 2 are set
 public void SetNextOperand(BaseDim operand)
 {
     if (d_left == null)
     {
         d_left = operand != null?operand.Clone() : null;
     }
     else if (d_right == null)
     {
         d_right = operand != null?operand.Clone() : null;
     }
     else
     {
         throw new InvalidRequestException("Both operands are already set.");
     }
 }
Ejemplo n.º 4
0
 //! set the right hand side operand (passed object is cloned)
 public void SetRightOperand(BaseDim operand)
 {
     // TODO: CEGUI_DELETE_AO d_right;
     d_right = operand != null?operand.Clone() : null;
 }
Ejemplo n.º 5
0
        // TODO: ...
        //~OperatorDim()
        //{
        //    CEGUI_DELETE_AO d_right;
        //    CEGUI_DELETE_AO d_left;
        //}

        //! set the left hand side operand (passed object is cloned)
        public void SetLeftOperand(BaseDim operand)
        {
            // TODO: CEGUI_DELETE_AO d_left;
            d_left = operand != null?operand.Clone() : null;
        }
Ejemplo n.º 6
0
        // TODO: ...
        //~Dimension()
        //{
        //    if (d_value)
        //        CEGUI_DELETE_AO d_value;
        //}

        // TODO: ...
        //Dimension(const Dimension& other)
        //{
        //    d_value = other.d_value ? other.d_value->clone() : 0;
        //    d_type = other.d_type;
        //}

        // TODO: ...
        //Dimension& operator=(const Dimension& other)
        //{
        //    // release old value, if any.
        //    if (d_value)
        //        CEGUI_DELETE_AO d_value;

        //    d_value = other.d_value ? other.d_value->clone() : 0;
        //    d_type = other.d_type;

        //    return *this;
        //}

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="dim">
        /// object based on subclass of BaseDim which holds the dimensional value.
        /// </param>
        /// <param name="type">
        /// DimensionType value indicating what dimension this object is to represent.
        /// </param>
        public Dimension(BaseDim dim, DimensionType type)
        {
            _value = dim.Clone();
            _type  = type;
        }