correct the graphml export of comment subjects
This commit is contained in:
@@ -468,6 +468,14 @@ CyberiadaEdge* Comment::subjects_to_edges() const
|
|||||||
edge->geometry_polyline = c_polyline(i->get_geometry_polyline());
|
edge->geometry_polyline = c_polyline(i->get_geometry_polyline());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (result) {
|
||||||
|
CyberiadaEdge* e = result;
|
||||||
|
while (e->next) e = e->next;
|
||||||
|
e->next = edge;
|
||||||
|
} else {
|
||||||
|
result = edge;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@@ -481,7 +489,7 @@ std::ostream& Comment::dump(std::ostream& os) const
|
|||||||
os << ", geometry: " << geometry_rect;
|
os << ", geometry: " << geometry_rect;
|
||||||
}
|
}
|
||||||
if (has_subjects()) {
|
if (has_subjects()) {
|
||||||
os << "subjects: {";
|
os << ", subjects: {";
|
||||||
for (std::list<CommentSubject>::const_iterator i = subjects.begin(); i != subjects.end(); i++) {
|
for (std::list<CommentSubject>::const_iterator i = subjects.begin(); i != subjects.end(); i++) {
|
||||||
os << *i;
|
os << *i;
|
||||||
if(std::next(i) != subjects.end()) {
|
if(std::next(i) != subjects.end()) {
|
||||||
@@ -1223,23 +1231,31 @@ StateMachine* Document::new_state_machine(const ID& _id, const String& sm_name,
|
|||||||
return sm;
|
return sm;
|
||||||
}
|
}
|
||||||
|
|
||||||
State* Document::new_state(ElementCollection* _parent, const String& state_name, const Rect& r, const Color& _color)
|
State* Document::new_state(ElementCollection* _parent, const String& state_name, const Action& a,
|
||||||
|
const Rect& r, const Color& _color)
|
||||||
{
|
{
|
||||||
check_parent_element(_parent);
|
check_parent_element(_parent);
|
||||||
check_nonempty_string(state_name);
|
check_nonempty_string(state_name);
|
||||||
|
|
||||||
State* state = new State(_parent, generate_vertex_id(_parent), state_name, r, _color);
|
State* state = new State(_parent, generate_vertex_id(_parent), state_name, r, _color);
|
||||||
|
if (!a.is_empty_transition()) {
|
||||||
|
state->add_action(a);
|
||||||
|
}
|
||||||
_parent->add_element(state);
|
_parent->add_element(state);
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
State* Document::new_state(ElementCollection* _parent, const ID& state_id, const String& state_name, const Rect& r, const Color& _color)
|
State* Document::new_state(ElementCollection* _parent, const ID& state_id, const String& state_name, const Action& a,
|
||||||
|
const Rect& r, const Color& _color)
|
||||||
{
|
{
|
||||||
check_parent_element(_parent);
|
check_parent_element(_parent);
|
||||||
check_nonempty_string(state_name);
|
check_nonempty_string(state_name);
|
||||||
check_id_uniqueness(state_id);
|
check_id_uniqueness(state_id);
|
||||||
|
|
||||||
State* state = new State(_parent, state_id, state_name, r, _color);
|
State* state = new State(_parent, state_id, state_name, r, _color);
|
||||||
|
if (!a.is_empty_transition()) {
|
||||||
|
state->add_action(a);
|
||||||
|
}
|
||||||
_parent->add_element(state);
|
_parent->add_element(state);
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -546,9 +546,9 @@ namespace Cyberiada {
|
|||||||
StateMachine* new_state_machine(const String& sm_name, const Rect& r = Rect());
|
StateMachine* new_state_machine(const String& sm_name, const Rect& r = Rect());
|
||||||
StateMachine* new_state_machine(const ID& id, const String& sm_name, const Rect& r = Rect());
|
StateMachine* new_state_machine(const ID& id, const String& sm_name, const Rect& r = Rect());
|
||||||
State* new_state(ElementCollection* parent, const String& state_name,
|
State* new_state(ElementCollection* parent, const String& state_name,
|
||||||
const Rect& r = Rect(), const Color& color = Color());
|
const Action& a = Action(), const Rect& r = Rect(), const Color& color = Color());
|
||||||
State* new_state(ElementCollection* parent, const ID& id, const String& state_name,
|
State* new_state(ElementCollection* parent, const ID& id, const String& state_name,
|
||||||
const Rect& r = Rect(), const Color& color = Color());
|
const Action& a = Action(), const Rect& r = Rect(), const Color& color = Color());
|
||||||
InitialPseudostate* new_initial(ElementCollection* parent, const Point& p = Point());
|
InitialPseudostate* new_initial(ElementCollection* parent, const Point& p = Point());
|
||||||
InitialPseudostate* new_initial(ElementCollection* parent, const Name& name, const Point& p = Point());
|
InitialPseudostate* new_initial(ElementCollection* parent, const Name& name, const Point& p = Point());
|
||||||
InitialPseudostate* new_initial(ElementCollection* parent, const ID& id, const Name& name, const Point& p = Point());
|
InitialPseudostate* new_initial(ElementCollection* parent, const ID& id, const Name& name, const Point& p = Point());
|
||||||
|
|||||||
Reference in New Issue
Block a user