Add flow/block style setting on Nodes

This commit is contained in:
Jesse Beder
2015-01-24 13:11:43 -06:00
parent 9880b608b9
commit 0c280724e9
13 changed files with 252 additions and 84 deletions

View File

@@ -164,6 +164,19 @@ inline void Node::SetTag(const std::string& tag) {
m_pNode->set_tag(tag);
}
inline EmitterStyle::value Node::Style() const {
if (!m_isValid)
throw InvalidNode();
return m_pNode ? m_pNode->style() : EmitterStyle::Default;
}
inline void Node::SetStyle(EmitterStyle::value style) {
if (!m_isValid)
throw InvalidNode();
EnsureNodeExists();
m_pNode->set_style(style);
}
// assignment
inline bool Node::is(const Node& rhs) const {
if (!m_isValid || !rhs.m_isValid)