aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.FileSystem/Network/PerformDiskSpaceOptimizationRequest.cs
blob: bd69bf9d8ab2c3c4962a6038963eadafcd0ad545 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.FileSystem.Network
{
    public class PerformDiskSpaceOptimizationRequest
    {
    }
}
orator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#include "stdafx.h"
#include "CRGB_XYZ_Lab.h"
#include <cmath>
#include <algorithm>    // std::min, max

// Default Constructor ... C_RGB_XYZ_Lab = (0, 0, 0)
C_RGB_XYZ_Lab::C_RGB_XYZ_Lab(void) :
	m_x(0.0),
	m_y(0.0),
	m_z(0.0)
{
}


// Constructor from a constant ... C_RGB_XYZ_Lab = (val, val, val)
C_RGB_XYZ_Lab::C_RGB_XYZ_Lab(const double &val) :
	m_x(val),
	m_y(val),
	m_z(val)
{
}


// Constructor from 3 values ... C_RGB_XYZ_Lab = (val1, val2, val3)
C_RGB_XYZ_Lab::C_RGB_XYZ_Lab(const double &val1, const double &val2, const double &val3) :
	m_x(val1),
	m_y(val2),
	m_z(val3)
{
}


// Constructor from 3 values in a vector
C_RGB_XYZ_Lab::C_RGB_XYZ_Lab(const VectorXd &Val):
m_x(Val(0)),
m_y(Val(1)),
m_z(Val(2))
{

}


// Copy constructor
C_RGB_XYZ_Lab::C_RGB_XYZ_Lab(const C_RGB_XYZ_Lab &rhs) :
	m_x(rhs.m_x),
	m_y(rhs.m_y),
	m_z(rhs.m_z)
{
}



// Get a vector from the RGB/XYZ/Lab
VectorXd C_RGB_XYZ_Lab::Get() const
{
	VectorXd vec(3);
	vec(0) = m_x;
	vec(1) = m_y;
	vec(2) = m_z;
	return vec;
}


// Set RGB/XYZ/Lab from a vector
void C_RGB_XYZ_Lab::Set(const VectorXd &rhs)
{
	m_x = rhs(0);
	m_y = rhs(1);
	m_z = rhs(2);
}


// Set RGB/XYZ/Lab from three values
void C_RGB_XYZ_Lab::Set(const double &val1, const double &val2, const double &val3)
{
	m_x = val1;
	m_y = val2;
	m_z = val3;
}


// Clip the individual components to the range [low,high]
void  C_RGB_XYZ_Lab::Clamp(C_RGB_XYZ_Lab &low, C_RGB_XYZ_Lab &high)
{
	m_x = std::min(std::max(m_x, low.Get_x()), high.Get_x());
	m_y = std::min(std::max(m_y, low.Get_y()), high.Get_y());
	m_z = std::min(std::max(m_z, low.Get_z()), high.Get_z());;
}


// add to existing value (rgb += rhs)
C_RGB_XYZ_Lab  &C_RGB_XYZ_Lab::operator += (C_RGB_XYZ_Lab &rhs)
{
	m_x += rhs.m_x;
	m_y += rhs.m_y;
	m_z += rhs.m_z;
	return (*this);
}


// subtract from existing value (lab -= rhs)
C_RGB_XYZ_Lab  &C_RGB_XYZ_Lab::operator -= (C_RGB_XYZ_Lab &rhs)
{
	m_x -= rhs.m_x;
	m_y -= rhs.m_y;
	m_z -= rhs.m_z;
	return (*this);
}


// multiply 2 RGB's (lab *= rhs)
C_RGB_XYZ_Lab  &C_RGB_XYZ_Lab::operator *= (C_RGB_XYZ_Lab &rhs)
{
	m_x *= rhs.m_x;
	m_y *= rhs.m_y;
	m_z *= rhs.m_z;
	return (*this);
}


// Divide 2 RGB's (lab /= rhs)
C_RGB_XYZ_Lab  &C_RGB_XYZ_Lab::operator /= (C_RGB_XYZ_Lab &rhs)
{
	m_x /= rhs.m_x;
	m_y /= rhs.m_y;
	m_z /= rhs.m_z;
	return (*this);
}

// isequal (lhs == rhs)
bool  operator == (C_RGB_XYZ_Lab &lhs, C_RGB_XYZ_Lab &rhs)
{
	return ((lhs.Get_x() == rhs.Get_x()) && (lhs.Get_y() == rhs.Get_y()) && (lhs.Get_z() == rhs.Get_z()));
}



// isnotequal (lhs != rhs)
bool  operator != (C_RGB_XYZ_Lab &lhs, C_RGB_XYZ_Lab &rhs)
{
	return (!operator == (lhs, rhs));
}