BlinkenArea - GitList
Repositories
Blog
Wiki
dxfngc
Code
Commits
Branches
Tags
Search
Tree:
1030916
Branches
Tags
master
dxfngc
src
optdbl.cpp
license CC-BY-SA --> GPL (more suitable for source code)
Stefan Schuermans
commited
1030916
at 2013-05-27 17:35:02
optdbl.cpp
Blame
History
Raw
/* drawing (DXF) to G-code (NGC) converter * Copyright 2013 Stefan Schuermans <stefan@schuermans.info> * Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html */ #include <iostream> #include <string> #include "optdbl.h" /// constructor OptDbl:: OptDbl(): mUse(false), mVal(0.0) { } /// unset double value void OptDbl::unset() { mUse = false; mVal = 0.0; } /// set double value void OptDbl::set(double val) { mUse = true; mVal = val; } /** * @brief output G-code command to stream * @param[in] stream to write to * @param[in] prefix to output */ void OptDbl::toStrm(std::ostream &strm, const std::string &prefix) const { if (mUse) strm << prefix << mVal; }