4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS.
16 #include "tex2lyx/Spacing.h"
42 Spacing() : space(Default), value("1.0") {}
44 Spacing(Spacing::Space sp, double val = 1.0) { set(sp, val); }
46 Spacing(Spacing::Space sp, std::string const & val) { set(sp, val); }
48 bool isDefault() const { return space == Default; }
50 std::string const getValueAsString() const;
52 double getValue() const;
54 Spacing::Space getSpace() const { return space; }
56 void set(Spacing::Space sp, double val = 1.0);
58 void set(Spacing::Space sp, std::string const & val);
60 void writeFile(std::ostream &, bool para = false) const;
62 std::string const writeEnvirBegin() const;
64 std::string const writeEnvirEnd() const;
71 /// names of line spacing
72 static std::string const spacing_string[];
78 bool operator==(Spacing const & a, Spacing const & b)
80 return a.getSpace() == b.getSpace()
81 && a.getValueAsString() == b.getValueAsString();
86 bool operator!=(Spacing const & a, Spacing const & b)