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"
43 Spacing() : space(Default), value("1.0") {}
45 Spacing(Spacing::Space sp, double val = 1.0) {
48 Spacing(Spacing::Space sp, std::string const & val) {
52 bool isDefault() const {
53 return space == Default;
56 std::string const getValueAsString() const;
58 double getValue() const;
60 Spacing::Space getSpace() const { return space; }
62 void set(Spacing::Space sp, double val = 1.0);
64 void set(Spacing::Space sp, std::string const & val);
66 void writeFile(std::ostream &, bool para = false) const;
68 std::string const writeEnvirBegin() const;
70 std::string const writeEnvirEnd() const;
77 /// names of line spacing
78 static std::string const spacing_string[];
84 bool operator==(Spacing const & a, Spacing const & b)
86 return a.getSpace() == b.getSpace()
87 && a.getValueAsString() == b.getValueAsString();
92 bool operator!=(Spacing const & a, Spacing const & b)