X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FSpacing.h;h=98f9463250fe4979d03906f0b7ac221aea6bb09e;hb=d5b3b6807a719bdc3510444b307a1d22a94c6876;hp=094d7d3d1c9fd14cb2241632c2c7fce2daa7bff9;hpb=fe4e2a84c664ab13a2cfbfcbdb953d72c77eb268;p=lyx.git diff --git a/src/Spacing.h b/src/Spacing.h index 094d7d3d1c..98f9463250 100644 --- a/src/Spacing.h +++ b/src/Spacing.h @@ -12,8 +12,14 @@ #ifndef SPACING_H #define SPACING_H +#ifdef __GNUG__ +#pragma interface +#endif + #include +#include "LString.h" + /// class Spacing { public: @@ -43,25 +49,33 @@ public: /// void set(Spacing::Space sp, float val = 1.0); /// - void set(Spacing::Space sp, char const * val) ; + void set(Spacing::Space sp, string const & val) ; /// void writeFile(std::ostream &, bool para = false) const; /// - friend bool operator==(Spacing const & a, Spacing const & b) { - if (a.space == b.space && a.getValue() == b.getValue()) - return true; - return false; - } + string const writeEnvirBegin() const; /// - friend bool operator!=(Spacing const & a, Spacing const & b) { - if (a.space == b.space && a.getValue() == b.getValue()) - return false; - return true; - } + string const writeEnvirEnd() const; private: /// Space space; /// float value; }; + + +/// +inline +bool operator==(Spacing const & a, Spacing const & b) +{ + return a.getSpace() == b.getSpace() + && a.getValue() == b.getValue(); +} + +/// +inline +bool operator!=(Spacing const & a, Spacing const & b) +{ + return !(a == b); +} #endif