[Libufo-commits] ufo-0.5/include/ufo/util udimension.hpp,1.11,1.12 uinsets.hpp,1.9,1.10 upalette.hpp
Status: Beta
Brought to you by:
schmidtjf
|
From: Johannes S. <sch...@us...> - 2005-09-30 12:36:58
|
Update of /cvsroot/libufo/ufo-0.5/include/ufo/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4063/include/ufo/util Modified Files: udimension.hpp uinsets.hpp upalette.hpp upoint.hpp urectangle.hpp Log Message: Explicitly inlined all inline methods (to mollify MinGw about dllimport linkage warnings). Index: urectangle.hpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/util/urectangle.hpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** urectangle.hpp 15 Sep 2005 10:10:42 -0000 1.17 --- urectangle.hpp 30 Sep 2005 12:36:48 -0000 1.18 *************** *** 49,77 **** class UFO_EXPORT URectangle { public: ! URectangle(); ! URectangle(int x, int y, int w, int h); ! URectangle(const UPoint & p, const UDimension & d); /** Computes a rectangle between two points. */ ! URectangle(const UPoint & p1, const UPoint & p2); /** Creates a rectangle with locatin 0,0 and the given size. */ ! URectangle(const UDimension & d); ! UPoint getLocation() const; ! UDimension getSize() const; ! void setBounds(int x, int y, int w, int h); ! void setBounds(const URectangle & rect); /** @return True when the given point pos is inside the rectangle * or on the edge of the rectangle */ ! bool contains(const UPoint & pos) const; /** @return True if the width and height are equal to @p invalid * @see invalid */ ! bool isInvalid() const; /** @return True if width or height is equal to 0. */ ! bool isEmpty() const; /** Clamps this URectangle to have at most the dimension of --- 49,81 ---- class UFO_EXPORT URectangle { public: ! inline URectangle(); ! inline URectangle(int x, int y, int w, int h); ! inline URectangle(const UPoint & p, const UDimension & d); /** Computes a rectangle between two points. */ ! inline URectangle(const UPoint & p1, const UPoint & p2); /** Creates a rectangle with locatin 0,0 and the given size. */ ! inline URectangle(const UDimension & d); ! inline UPoint getLocation() const; ! inline UDimension getSize() const; ! inline void setBounds(int x, int y, int w, int h); ! inline void setBounds(const URectangle & rect); /** @return True when the given point pos is inside the rectangle * or on the edge of the rectangle */ ! inline bool contains(const UPoint & pos) const; + /** @return True if both, width and height are not equal to @p invalid + * @see invalid + */ + inline bool isValid() const; /** @return True if the width and height are equal to @p invalid * @see invalid */ ! inline bool isInvalid() const; /** @return True if width or height is equal to 0. */ ! inline bool isEmpty() const; /** Clamps this URectangle to have at most the dimension of *************** *** 79,100 **** * the size of this rectangle. */ ! void clamp(const UDimension & maxDim); /** Expands this URectangle to have at least the dimension of * the given @p minDim. Does nothing if minDim is bigger than * the size of this rectangle. */ ! void expand(const UDimension & minDim); /** Intersects this rectangle with the given rectangle */ ! void intersect(const URectangle & rect); /** Unites this rectangle with the given rectangle. * @see computeUnion */ ! void unite(const URectangle & rect); /** @return The union of this rectangle and the given rectangle */ ! URectangle computeUnion(const URectangle & src) const; /** computes the rectangle that contains both src rectangles and --- 83,104 ---- * the size of this rectangle. */ ! inline void clamp(const UDimension & maxDim); /** Expands this URectangle to have at least the dimension of * the given @p minDim. Does nothing if minDim is bigger than * the size of this rectangle. */ ! inline void expand(const UDimension & minDim); /** Intersects this rectangle with the given rectangle */ ! inline void intersect(const URectangle & rect); /** Unites this rectangle with the given rectangle. * @see computeUnion */ ! inline void unite(const URectangle & rect); /** @return The union of this rectangle and the given rectangle */ ! inline URectangle computeUnion(const URectangle & src) const; /** computes the rectangle that contains both src rectangles and *************** *** 104,113 **** * @return dest */ ! static URectangle * computeUnion(const URectangle & src1, const URectangle & src2, URectangle * dest); public: // Public operators ! bool operator()() const { return !(isEmpty()); } ! bool operator!() const { return isEmpty(); } --- 108,123 ---- * @return dest */ ! inline static URectangle * computeUnion(const URectangle & src1, const URectangle & src2, URectangle * dest); public: // Public operators ! /** @see isValid ! * @return True if width and height have both "valid" values. ! */ ! inline bool operator()() const; ! /** @see isInvalid ! * @return True if width or height is "invalid". ! */ ! inline bool operator!() const; *************** *** 115,148 **** * @return Reference to this rectangle. */ ! URectangle & operator+=(const UPoint & p); /** Moves this rectangle using the coordinates of the given point * @return Reference to this rectangle. */ ! URectangle & operator-=(const UPoint & p); /** Increases this rectangle using the given dimension * @return Reference to this rectangle. */ ! URectangle & operator+=(const UDimension & dim); /** Shrinks this rectangle using the given dimension * @return Reference to this rectangle. */ ! URectangle & operator-=(const UDimension & dim); /** Increases this rectangle using the given insets * @return Reference to this rectangle. */ ! URectangle & operator+=(const UInsets & insets); /** Shrinks this rectangle using the given insets * @return Reference to this rectangle. */ ! URectangle & operator-=(const UInsets & insets); ! friend std::ostream & operator<<(std::ostream & os, const URectangle & o); ! /* ! UObject * clone() const; ! protected: // Protected methods ! std::ostream & paramString(std::ostream & os) const; ! */ public: // Public attributes int x; --- 125,153 ---- * @return Reference to this rectangle. */ ! inline URectangle & operator+=(const UPoint & p); /** Moves this rectangle using the coordinates of the given point * @return Reference to this rectangle. */ ! inline URectangle & operator-=(const UPoint & p); /** Increases this rectangle using the given dimension * @return Reference to this rectangle. */ ! inline URectangle & operator+=(const UDimension & dim); /** Shrinks this rectangle using the given dimension * @return Reference to this rectangle. */ ! inline URectangle & operator-=(const UDimension & dim); /** Increases this rectangle using the given insets * @return Reference to this rectangle. */ ! inline URectangle & operator+=(const UInsets & insets); /** Shrinks this rectangle using the given insets * @return Reference to this rectangle. */ ! inline URectangle & operator-=(const UInsets & insets); ! inline friend std::ostream & operator<<(std::ostream & os, const URectangle & o); public: // Public attributes int x; *************** *** 158,173 **** // public operators // ! UFO_EXPORT URectangle operator+(const URectangle & rect, const UPoint & p); ! UFO_EXPORT URectangle operator-(const URectangle & rect, const UPoint & p); ! UFO_EXPORT URectangle operator+(const URectangle & rect, const UDimension & dim); ! UFO_EXPORT URectangle operator-(const URectangle & rect, const UDimension & dim); ! UFO_EXPORT URectangle operator+(const URectangle & rect, const UInsets & in); ! UFO_EXPORT URectangle operator-(const URectangle & rect, const UInsets & in); /// Equality ! UFO_EXPORT bool operator==(const URectangle & r1,const URectangle & r2); ! UFO_EXPORT bool operator!=(const URectangle & r1,const URectangle & r2); /** wrapper class for URectangle derived from UObject --- 163,178 ---- // public operators // ! inline URectangle operator+(const URectangle & rect, const UPoint & p); ! inline URectangle operator-(const URectangle & rect, const UPoint & p); ! inline URectangle operator+(const URectangle & rect, const UDimension & dim); ! inline URectangle operator-(const URectangle & rect, const UDimension & dim); ! inline URectangle operator+(const URectangle & rect, const UInsets & in); ! inline URectangle operator-(const URectangle & rect, const UInsets & in); /// Equality ! inline bool operator==(const URectangle & r1,const URectangle & r2); ! inline bool operator!=(const URectangle & r1,const URectangle & r2); /** wrapper class for URectangle derived from UObject *************** *** 177,186 **** UFO_DECLARE_DYNAMIC_CLASS(URectangleObject) public: ! URectangleObject(); ! URectangleObject(const URectangle & rect); ! URectangleObject(int x, int y, int w, int h); ! URectangleObject(const UPoint & p, const UDimension & d); /** Computes a rectangle between two points. */ ! URectangleObject(const UPoint & p1, const UPoint & p2); // --- 182,191 ---- UFO_DECLARE_DYNAMIC_CLASS(URectangleObject) public: ! inline URectangleObject(); ! inline URectangleObject(const URectangle & rect); ! inline URectangleObject(int x, int y, int w, int h); ! inline URectangleObject(const UPoint & p, const UDimension & d); /** Computes a rectangle between two points. */ ! inline URectangleObject(const UPoint & p1, const UPoint & p2); // *************** *** 325,328 **** --- 330,341 ---- inline bool + URectangle::isValid() const { + return (x != URectangle::invalid.x && + y != URectangle::invalid.y && + w != URectangle::invalid.w && + h != URectangle::invalid.h); + } + + inline bool URectangle::isEmpty() const { return (!(w && h)); *************** *** 335,338 **** --- 348,361 ---- } + inline bool + URectangle::operator()() const { + return isValid(); + } + + inline bool + URectangle::operator!() const { + return !isValid(); + } + inline URectangle & URectangle::operator+=(const UPoint & p) { Index: upoint.hpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/util/upoint.hpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** upoint.hpp 21 May 2005 15:17:23 -0000 1.14 --- upoint.hpp 30 Sep 2005 12:36:48 -0000 1.15 *************** *** 44,100 **** class UFO_EXPORT UPoint { public: ! UPoint(); ! UPoint(int x, int y); ! int getX() const; ! void setX(int x); ! int getY() const; ! void setY(int y); /** for convenience */ ! void setLocation(const UPoint & p); /** Returns a copy. For convenience */ ! UPoint getLocation() const; /** This method is for convenience. It adds p to this point.*/ ! void translate(const UPoint & p); /** @return True if the width and height are equal to @p invalid * @see invalid */ ! bool isInvalid() const; /** @return True if both, x and y are exactly 0. */ ! bool isNull() const; /** Adds point p to this point * @return Reference to this point. */ ! UPoint & operator+=(const UPoint & p); /** Subtracts point p from this point * @return Reference to this point. */ ! UPoint & operator-=(const UPoint & p); /** Multiplies c to both x and y coordinate of this point. * @return Reference to this point. */ ! UPoint & operator*=(int c); /** Multiplies c to both x and y coordinate of this point. * Truncates the values to integers. * @return Reference to this point. */ ! UPoint & operator*=(double c); /** Divides both x and y by c. * Truncates the values to integers. * @return Reference to this point. */ ! UPoint & operator/=(int c); /** Divides both x and y by c. * Truncates the values to integers. * @return Reference to this point. */ ! UPoint & operator/=(double c); ! friend std::ostream & operator<<(std::ostream & os, const UPoint & o); public: // Public attributes --- 44,100 ---- class UFO_EXPORT UPoint { public: ! inline UPoint(); ! inline UPoint(int x, int y); ! inline int getX() const; ! inline void setX(int x); ! inline int getY() const; ! inline void setY(int y); /** for convenience */ ! inline void setLocation(const UPoint & p); /** Returns a copy. For convenience */ ! inline UPoint getLocation() const; /** This method is for convenience. It adds p to this point.*/ ! inline void translate(const UPoint & p); /** @return True if the width and height are equal to @p invalid * @see invalid */ ! inline bool isInvalid() const; /** @return True if both, x and y are exactly 0. */ ! inline bool isNull() const; /** Adds point p to this point * @return Reference to this point. */ ! inline UPoint & operator+=(const UPoint & p); /** Subtracts point p from this point * @return Reference to this point. */ ! inline UPoint & operator-=(const UPoint & p); /** Multiplies c to both x and y coordinate of this point. * @return Reference to this point. */ ! inline UPoint & operator*=(int c); /** Multiplies c to both x and y coordinate of this point. * Truncates the values to integers. * @return Reference to this point. */ ! inline UPoint & operator*=(double c); /** Divides both x and y by c. * Truncates the values to integers. * @return Reference to this point. */ ! inline UPoint & operator/=(int c); /** Divides both x and y by c. * Truncates the values to integers. * @return Reference to this point. */ ! inline UPoint & operator/=(double c); ! inline friend std::ostream & operator<<(std::ostream & os, const UPoint & o); public: // Public attributes *************** *** 108,125 **** // public operators // ! UFO_EXPORT UPoint operator+(const UPoint & p1, const UPoint & p2); ! UFO_EXPORT UPoint operator-(const UPoint & p1, const UPoint & p2); // equivalent to UPoint(0, 0) - p. ! UFO_EXPORT UPoint operator-(const UPoint & p); ! UFO_EXPORT UPoint operator*(const UPoint & p, int c); ! UFO_EXPORT UPoint operator*(int c, const UPoint & p); ! UFO_EXPORT UPoint operator*(const UPoint & p, double c); ! UFO_EXPORT UPoint operator*(double c, const UPoint & p); ! UFO_EXPORT UPoint operator/(const UPoint & p, int c); ! UFO_EXPORT UPoint operator/(const UPoint & p, double c); /// Equality ! UFO_EXPORT bool operator==(const UPoint & p1,const UPoint & p2); ! UFO_EXPORT bool operator!=(const UPoint & p1,const UPoint & p2); /** wrapper class for UDimension which is derived from UObject. --- 108,125 ---- // public operators // ! inline UPoint operator+(const UPoint & p1, const UPoint & p2); ! inline UPoint operator-(const UPoint & p1, const UPoint & p2); // equivalent to UPoint(0, 0) - p. ! inline UPoint operator-(const UPoint & p); ! inline UPoint operator*(const UPoint & p, int c); ! inline UPoint operator*(int c, const UPoint & p); ! inline UPoint operator*(const UPoint & p, double c); ! inline UPoint operator*(double c, const UPoint & p); ! inline UPoint operator/(const UPoint & p, int c); ! inline UPoint operator/(const UPoint & p, double c); /// Equality ! inline bool operator==(const UPoint & p1,const UPoint & p2); ! inline bool operator!=(const UPoint & p1,const UPoint & p2); /** wrapper class for UDimension which is derived from UObject. *************** *** 129,135 **** UFO_DECLARE_DYNAMIC_CLASS(UPointObject) public: ! UPointObject(); ! UPointObject(const UPoint & p); ! UPointObject(int w, int h); // --- 129,135 ---- UFO_DECLARE_DYNAMIC_CLASS(UPointObject) public: ! inline UPointObject(); ! inline UPointObject(const UPoint & p); ! inline UPointObject(int w, int h); // Index: uinsets.hpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/util/uinsets.hpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** uinsets.hpp 21 May 2005 15:17:23 -0000 1.9 --- uinsets.hpp 30 Sep 2005 12:36:48 -0000 1.10 *************** *** 49,53 **** public: /** Creates an empty insets object. */ ! UInsets(); /** Creates an insets object with the given values. * @param top The inset at top --- 49,53 ---- public: /** Creates an empty insets object. */ ! inline UInsets(); /** Creates an insets object with the given values. * @param top The inset at top *************** *** 56,84 **** * @param top The inset at right */ ! UInsets(int top, int left, int bottom, int right); ! int getTop() const; ! int getLeft() const; ! int getBottom() const; ! int getRight() const; /** @return The total insets in horizontal direction, i.e. left + right. */ ! int getHorizontal() const; /** @return The total insets in vertical direction, i.e. top + bottom. */ ! int getVertical() const; /** Increases the insets by the given insets, that means add @p add.top * to this.top etc. */ ! void grow(const UInsets & add); /** @return True if all insets are exactly 0. */ ! bool isEmpty() const; public: // Public operators /** @return True if one of the insets is non-zero. */ ! bool operator()() { return !(isEmpty()); } /** @return True if all insets are exactly 0. */ ! bool operator!() { return isEmpty(); } /** Increases the insets by the given insets, that means add @p add.top --- 56,84 ---- * @param top The inset at right */ ! inline UInsets(int top, int left, int bottom, int right); ! inline int getTop() const; ! inline int getLeft() const; ! inline int getBottom() const; ! inline int getRight() const; /** @return The total insets in horizontal direction, i.e. left + right. */ ! inline int getHorizontal() const; /** @return The total insets in vertical direction, i.e. top + bottom. */ ! inline int getVertical() const; /** Increases the insets by the given insets, that means add @p add.top * to this.top etc. */ ! inline void grow(const UInsets & add); /** @return True if all insets are exactly 0. */ ! inline bool isEmpty() const; public: // Public operators /** @return True if one of the insets is non-zero. */ ! inline bool operator()(); /** @return True if all insets are exactly 0. */ ! inline bool operator!(); /** Increases the insets by the given insets, that means add @p add.top *************** *** 86,90 **** * @return Reference to this insets object. */ ! UInsets & operator+=(const UInsets & in); /** Decreases the insets by the given insets, that means substract --- 86,90 ---- * @return Reference to this insets object. */ ! inline UInsets & operator+=(const UInsets & in); /** Decreases the insets by the given insets, that means substract *************** *** 92,98 **** * @return Reference to this insets object. */ ! UInsets & operator-=(const UInsets & in); ! friend std::ostream & operator<<(std::ostream & os, const UInsets & o); public: // Public attributes --- 92,98 ---- * @return Reference to this insets object. */ ! inline UInsets & operator-=(const UInsets & in); ! inline friend std::ostream & operator<<(std::ostream & os, const UInsets & o); public: // Public attributes *************** *** 107,116 **** // public operators // ! UFO_EXPORT UInsets operator+(const UInsets & in1, const UInsets & in2); ! UFO_EXPORT UInsets operator-(const UInsets & in1, const UInsets & in2); /// Equality ! UFO_EXPORT bool operator==(const UInsets & in1,const UInsets & in2); ! UFO_EXPORT bool operator!=(const UInsets & in1,const UInsets & in2); --- 107,116 ---- // public operators // ! inline UInsets operator+(const UInsets & in1, const UInsets & in2); ! inline UInsets operator-(const UInsets & in1, const UInsets & in2); /// Equality ! inline bool operator==(const UInsets & in1,const UInsets & in2); ! inline bool operator!=(const UInsets & in1,const UInsets & in2); *************** *** 195,198 **** --- 195,208 ---- } + inline bool + UInsets::operator()() { + return !(isEmpty()); + } + + inline bool + UInsets::operator!() { + return isEmpty(); + } + inline UInsets & Index: udimension.hpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/util/udimension.hpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** udimension.hpp 21 May 2005 15:19:11 -0000 1.11 --- udimension.hpp 30 Sep 2005 12:36:48 -0000 1.12 *************** *** 48,62 **** /** Creates an empty dimension (width == 0 and height == 0). */ ! UDimension(); /** Creates a dimension with the given width and height. * @param w The width * @param h The height */ ! UDimension(int w, int h); /** @return The width of this dimension. */ ! int getWidth() const; /** @return The height of this dimension. */ ! int getHeight() const; --- 48,62 ---- /** Creates an empty dimension (width == 0 and height == 0). */ ! inline UDimension(); /** Creates a dimension with the given width and height. * @param w The width * @param h The height */ ! inline UDimension(int w, int h); /** @return The width of this dimension. */ ! inline int getWidth() const; /** @return The height of this dimension. */ ! inline int getHeight() const; *************** *** 64,74 **** * @see invalid */ ! bool isInvalid() const; /** @return True if both, width and height are not equal to @p invalid * @see invalid */ ! bool isValid() const; /** @return True if width or height is equal to 0. */ ! bool isEmpty() const; /** Clamps this UDimension to have at most the dimension of --- 64,74 ---- * @see invalid */ ! inline bool isInvalid() const; /** @return True if both, width and height are not equal to @p invalid * @see invalid */ ! inline bool isValid() const; /** @return True if width or height is equal to 0. */ ! inline bool isEmpty() const; /** Clamps this UDimension to have at most the dimension of *************** *** 76,85 **** * this UDimension. */ ! void clamp(const UDimension & maxDim); /** Expands this UDimension to have at least the dimension of * the given @p minDim. Does nothing if minDim is bigger than * this UDimension. */ ! void expand(const UDimension & minDim); /** If width resp. height of this dimension is equal to @p invalid, --- 76,85 ---- * this UDimension. */ ! inline void clamp(const UDimension & maxDim); /** Expands this UDimension to have at least the dimension of * the given @p minDim. Does nothing if minDim is bigger than * this UDimension. */ ! inline void expand(const UDimension & minDim); /** If width resp. height of this dimension is equal to @p invalid, *************** *** 88,92 **** * of invalid values */ ! void update(const UDimension & dim); /** If width resp. height of the given dimension is not euqal to * @p invalid, the width resp. height of this dimension is replaced by --- 88,92 ---- * of invalid values */ ! inline void update(const UDimension & dim); /** If width resp. height of the given dimension is not euqal to * @p invalid, the width resp. height of this dimension is replaced by *************** *** 95,99 **** * of this dimension. */ ! void transcribe(const UDimension & dim); /** Sets the size of this dimension to the given values. --- 95,99 ---- * of this dimension. */ ! inline void transcribe(const UDimension & dim); /** Sets the size of this dimension to the given values. *************** *** 101,151 **** * @param h The new height */ ! void setSize(int w, int h); /** This method is for convenience and mimics the API of widget types. * @return A copy of this dimension object. */ ! UDimension getSize() const; public: // Public operators ! /** @return True if width and height are both not zero. */ ! bool operator()() { return !(isEmpty()); } ! /** @return True if width or height is equal to 0. */ ! bool operator!() { return isEmpty(); } /** Adds dimension @p dim to this dimension * @return Reference to this dimension. */ ! UDimension & operator+=(const UDimension & dim); /** Subtracts dimension @p dim from this dimension * @return Reference to this dimension. */ ! UDimension & operator-=(const UDimension & dim); /** Increases this dimension using the given insets * @return Reference to this rectangle. */ ! UDimension & operator+=(const UInsets & insets); /** Shrinks this dimension using the given insets * @return Reference to this rectangle. */ ! UDimension & operator-=(const UInsets & insets); /** Multiplies @p c with both width and height of this dimension. * @return Reference to this dimension. */ ! UDimension & operator*=(int c); /** Multiplies @p c with both width and height of this dimension. * @return Reference to this dimension. */ ! UDimension & operator*=(double c); /** Divides both width and height by @p c. * @return Reference to this dimension. */ ! UDimension & operator/=(int c); /** Divides both width and height by @p c. * @return Reference to this dimension. */ ! UDimension & operator/=(double c); ! friend std::ostream & operator<<(std::ostream & os, const UDimension & o); public: // Public attributes /** The width of this dimension object. */ --- 101,155 ---- * @param h The new height */ ! inline void setSize(int w, int h); /** This method is for convenience and mimics the API of widget types. * @return A copy of this dimension object. */ ! inline UDimension getSize() const; public: // Public operators ! /** @see isValid ! * @return True if width and height have both "valid" values. ! */ ! inline bool operator()() const; ! /** @see isInvalid ! * @return True if width or height is "invalid". ! */ ! inline bool operator!() const; /** Adds dimension @p dim to this dimension * @return Reference to this dimension. */ ! inline UDimension & operator+=(const UDimension & dim); /** Subtracts dimension @p dim from this dimension * @return Reference to this dimension. */ ! inline UDimension & operator-=(const UDimension & dim); /** Increases this dimension using the given insets * @return Reference to this rectangle. */ ! inline UDimension & operator+=(const UInsets & insets); /** Shrinks this dimension using the given insets * @return Reference to this rectangle. */ ! inline UDimension & operator-=(const UInsets & insets); /** Multiplies @p c with both width and height of this dimension. * @return Reference to this dimension. */ ! inline UDimension & operator*=(int c); /** Multiplies @p c with both width and height of this dimension. * @return Reference to this dimension. */ ! inline UDimension & operator*=(double c); /** Divides both width and height by @p c. * @return Reference to this dimension. */ ! inline UDimension & operator/=(int c); /** Divides both width and height by @p c. * @return Reference to this dimension. */ ! inline UDimension & operator/=(double c); ! inline friend std::ostream & operator<<(std::ostream & os, const UDimension & o); public: // Public attributes /** The width of this dimension object. */ *************** *** 161,178 **** // public operators // ! UFO_EXPORT UDimension operator+(const UDimension & dim1, const UDimension & dim2); ! UFO_EXPORT UDimension operator-(const UDimension & dim1, const UDimension & dim2); ! UFO_EXPORT UDimension operator+(const UDimension & dim, const UInsets & in); ! UFO_EXPORT UDimension operator-(const UDimension & dim, const UInsets & in); ! UFO_EXPORT UDimension operator*(const UDimension & dim, int c); ! UFO_EXPORT UDimension operator*(int c, const UDimension & p); ! UFO_EXPORT UDimension operator*(const UDimension & dim, double c); ! UFO_EXPORT UDimension operator*(double c, const UDimension & p); ! UFO_EXPORT UDimension operator/(const UDimension & dim, int c); ! UFO_EXPORT UDimension operator/(const UDimension & dim, double c); /// Equality ! UFO_EXPORT bool operator==(const UDimension & dim1,const UDimension & dim2); ! UFO_EXPORT bool operator!=(const UDimension & dim1,const UDimension & dim2); --- 165,182 ---- // public operators // ! inline UDimension operator+(const UDimension & dim1, const UDimension & dim2); ! inline UDimension operator-(const UDimension & dim1, const UDimension & dim2); ! inline UDimension operator+(const UDimension & dim, const UInsets & in); ! inline UDimension operator-(const UDimension & dim, const UInsets & in); ! inline UDimension operator*(const UDimension & dim, int c); ! inline UDimension operator*(int c, const UDimension & p); ! inline UDimension operator*(const UDimension & dim, double c); ! inline UDimension operator*(double c, const UDimension & p); ! inline UDimension operator/(const UDimension & dim, int c); ! inline UDimension operator/(const UDimension & dim, double c); /// Equality ! inline bool operator==(const UDimension & dim1,const UDimension & dim2); ! inline bool operator!=(const UDimension & dim1,const UDimension & dim2); *************** *** 183,189 **** UFO_DECLARE_DYNAMIC_CLASS(UDimensionObject) public: ! UDimensionObject(); ! UDimensionObject(const UDimension & dim); ! UDimensionObject(int w, int h); // --- 187,193 ---- UFO_DECLARE_DYNAMIC_CLASS(UDimensionObject) public: ! inline UDimensionObject(); ! inline UDimensionObject(const UDimension & dim); ! inline UDimensionObject(int w, int h); // *************** *** 277,280 **** --- 281,293 ---- } + inline bool + UDimension::operator()() const { + return isValid(); + } + + inline bool + UDimension::operator!() const { + return !isValid(); + } Index: upalette.hpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/util/upalette.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** upalette.hpp 21 May 2005 16:28:44 -0000 1.5 --- upalette.hpp 30 Sep 2005 12:36:48 -0000 1.6 *************** *** 100,105 **** ! void setColor(ColorRole role, const UColor & color); ! const UColor & getColor(ColorRole role) const; /** Every color of @p pal which is no default color of the default --- 100,105 ---- ! inline void setColor(ColorRole role, const UColor & color); ! inline const UColor & getColor(ColorRole role) const; /** Every color of @p pal which is no default color of the default *************** *** 143,147 **** public: // Public operators bool operator==(const UPalette & pal) const; ! bool operator!=(const UPalette & pal) const; protected: // Overrides UObject --- 143,147 ---- public: // Public operators bool operator==(const UPalette & pal) const; ! inline bool operator!=(const UPalette & pal) const; protected: // Overrides UObject |