1999-09-27 18:44:28 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
1999-12-07 00:44:53 +00:00
|
|
|
#include <cstdio>
|
1999-09-27 18:44:28 +00:00
|
|
|
#include "Spacing.h"
|
|
|
|
|
|
|
|
/// how can I put this inside of Spacing (class)
|
|
|
|
static
|
1999-12-07 00:44:53 +00:00
|
|
|
char const * spacing_string[] = {"single", "onehalf", "double", "other"};
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
1999-12-07 00:44:53 +00:00
|
|
|
void Spacing::writeFile(ostream & os)
|
1999-09-27 18:44:28 +00:00
|
|
|
{
|
|
|
|
if (getSpace() == Spacing::Other) {
|
1999-12-07 00:44:53 +00:00
|
|
|
os.setf(ios::showpoint|ios::fixed);
|
|
|
|
os.precision(2);
|
|
|
|
os << "\\spacing " << spacing_string[getSpace()]
|
|
|
|
<< " " << getValue() << " \n";
|
1999-09-27 18:44:28 +00:00
|
|
|
} else {
|
1999-12-07 00:44:53 +00:00
|
|
|
os << "\\spacing " << spacing_string[getSpace()] << " \n";
|
1999-09-27 18:44:28 +00:00
|
|
|
}
|
|
|
|
}
|