[Positioning] Add Point3D::operator bool()
This commit is contained in:
parent
6c3647410d
commit
1bb589b460
|
@ -117,6 +117,19 @@ Point3D::operator string(void) const
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return \em true if either #x, #y or #z is non-zero.
|
||||
* @return \em false if #x, #y and #z are defined to 0.
|
||||
*/
|
||||
Point3D::operator bool(void) const
|
||||
{
|
||||
return
|
||||
x != 0 &&
|
||||
y != 0 &&
|
||||
z != 0 ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ostream& operator<<(ostream &os, const Point3D &p)
|
||||
{
|
||||
|
|
|
@ -72,6 +72,7 @@ public:
|
|||
bool operator>(const Point3D &source) const ;
|
||||
bool operator<=(const Point3D &source) const ;
|
||||
bool operator>=(const Point3D &source) const ;
|
||||
operator bool(void) const ;
|
||||
operator std::string(void) const ;
|
||||
//@}
|
||||
|
||||
|
|
Loading…
Reference in New Issue