// Operator function for 'greater than' that
// compares volumes of CBox objects.
bool CBox::operator>(const CBox& aBox) const
{
  return this->Volume() > aBox.Volume();
}
Esempio n. 2
0
File: 源.cpp Progetto: Hackergeek/C
	bool operator == (const CBox& aBox) const
	{
		return this->Volume() == aBox.Volume();
	}
Esempio n. 3
0
File: 源.cpp Progetto: Hackergeek/C
inline bool operator > (const double& value, const CBox& aBox)
{
	return value > aBox.Volume();
}
Esempio n. 4
0
File: 源.cpp Progetto: Hackergeek/C
	bool operator < (const CBox& aBox) const
	{
		return this->Volume() < aBox.Volume();
	}
Esempio n. 5
0
 // Function to compare two boxes which returns true (1)
 // if the first is greater than the second, and false (0) otherwise
 int Compare(const CBox& xBox) const {
     return this->Volume() > xBox.Volume();
 }
// Function for testing if a constant is < CBox object
bool operator<(const double& value, const CBox& aBox)
{ return value < aBox.Volume(); }
// Operator to return the free volume in a packed CBox
double operator%( const CBox& aBox, const CBox& bBox)
{ return aBox.Volume() - (aBox / bBox) * bBox.Volume(); }
Esempio n. 8
0
 // Function to compare two boxes which returns true
 // if the first is greater than the second, and false otherwise
 bool Compare(CBox& xBox) {
     return this->Volume() > xBox.Volume();
 }