correct SM dump output
This commit is contained in:
@@ -122,20 +122,20 @@ std::ostream& Element::dump(std::ostream& os) const
|
|||||||
{
|
{
|
||||||
String type_str;
|
String type_str;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case elementRoot: type_str = "doc"; break;
|
case elementRoot: type_str = "Document"; break;
|
||||||
case elementSM: type_str = "stm"; break;
|
case elementSM: type_str = "State Machine"; break;
|
||||||
case elementSimpleState: type_str = "sst"; break;
|
case elementSimpleState: type_str = "Simple State"; break;
|
||||||
case elementCompositeState: type_str = "cst"; break;
|
case elementCompositeState: type_str = "Composite State"; break;
|
||||||
case elementComment: type_str = "ico"; break;
|
case elementComment: type_str = "Comment"; break;
|
||||||
case elementFormalComment: type_str = "fco"; break;
|
case elementFormalComment: type_str = "Formal Comment"; break;
|
||||||
case elementInitial: type_str = "ini"; break;
|
case elementInitial: type_str = "Initial"; break;
|
||||||
case elementFinal: type_str = "fin"; break;
|
case elementFinal: type_str = "Final"; break;
|
||||||
case elementChoice: type_str = "cho"; break;
|
case elementChoice: type_str = "Choice"; break;
|
||||||
case elementTransition: type_str = "tra"; break;
|
case elementTransition: type_str = "Transition"; break;
|
||||||
default:
|
default:
|
||||||
CYB_ASSERT(false);
|
CYB_ASSERT(false);
|
||||||
}
|
}
|
||||||
os << "Element type: " << type_str << ", id: '" << id << "'";
|
os << type_str << ": {id: '" << id << "'";
|
||||||
if (name_is_set) {
|
if (name_is_set) {
|
||||||
os << ", name: '" << name << "'";
|
os << ", name: '" << name << "'";
|
||||||
}
|
}
|
||||||
@@ -472,7 +472,6 @@ CyberiadaEdge* Comment::subjects_to_edge() const
|
|||||||
|
|
||||||
std::ostream& Comment::dump(std::ostream& os) const
|
std::ostream& Comment::dump(std::ostream& os) const
|
||||||
{
|
{
|
||||||
os << "Comment { " << (human_readable ? "informal" : "formal") << ", ";
|
|
||||||
Element::dump(os);
|
Element::dump(os);
|
||||||
os << ", body: '" << body << "'";
|
os << ", body: '" << body << "'";
|
||||||
if (has_geometry()) {
|
if (has_geometry()) {
|
||||||
@@ -835,7 +834,6 @@ InitialPseudostate::InitialPseudostate(Element* _parent, const ID& _id, const Na
|
|||||||
|
|
||||||
std::ostream& InitialPseudostate::dump(std::ostream& os) const
|
std::ostream& InitialPseudostate::dump(std::ostream& os) const
|
||||||
{
|
{
|
||||||
os << "Initial {";
|
|
||||||
Element::dump(os);
|
Element::dump(os);
|
||||||
Vertex::dump(os);
|
Vertex::dump(os);
|
||||||
os << "}";
|
os << "}";
|
||||||
@@ -870,7 +868,6 @@ CyberiadaNode* ChoicePseudostate::to_node() const
|
|||||||
|
|
||||||
std::ostream& ChoicePseudostate::dump(std::ostream& os) const
|
std::ostream& ChoicePseudostate::dump(std::ostream& os) const
|
||||||
{
|
{
|
||||||
os << "Choice {";
|
|
||||||
Element::dump(os);
|
Element::dump(os);
|
||||||
if (has_geometry()) {
|
if (has_geometry()) {
|
||||||
os << ", geometry: " << geometry_rect;
|
os << ", geometry: " << geometry_rect;
|
||||||
@@ -898,7 +895,6 @@ FinalState::FinalState(Element* _parent, const ID& _id, const Name& _name, const
|
|||||||
|
|
||||||
std::ostream& FinalState::dump(std::ostream& os) const
|
std::ostream& FinalState::dump(std::ostream& os) const
|
||||||
{
|
{
|
||||||
os << "Final {";
|
|
||||||
Element::dump(os);
|
Element::dump(os);
|
||||||
Vertex::dump(os);
|
Vertex::dump(os);
|
||||||
os << "}";
|
os << "}";
|
||||||
@@ -1003,11 +999,6 @@ CyberiadaNode* State::to_node() const
|
|||||||
|
|
||||||
std::ostream& State::dump(std::ostream& os) const
|
std::ostream& State::dump(std::ostream& os) const
|
||||||
{
|
{
|
||||||
if (is_simple_state()) {
|
|
||||||
os << "State {";
|
|
||||||
} else {
|
|
||||||
os << "Composite state {";
|
|
||||||
}
|
|
||||||
Element::dump(os);
|
Element::dump(os);
|
||||||
if (has_actions()) {
|
if (has_actions()) {
|
||||||
os << ", actions: {";
|
os << ", actions: {";
|
||||||
@@ -1072,7 +1063,6 @@ CyberiadaEdge* Transition::to_edge() const
|
|||||||
|
|
||||||
std::ostream& Transition::dump(std::ostream& os) const
|
std::ostream& Transition::dump(std::ostream& os) const
|
||||||
{
|
{
|
||||||
os << "Transition {";
|
|
||||||
Element::dump(os);
|
Element::dump(os);
|
||||||
if (has_action()) {
|
if (has_action()) {
|
||||||
os << ", action: {";
|
os << ", action: {";
|
||||||
@@ -1154,7 +1144,6 @@ std::list<Transition*> StateMachine::get_transitions()
|
|||||||
|
|
||||||
std::ostream& StateMachine::dump(std::ostream& os) const
|
std::ostream& StateMachine::dump(std::ostream& os) const
|
||||||
{
|
{
|
||||||
os << "State Machine {";
|
|
||||||
Element::dump(os);
|
Element::dump(os);
|
||||||
ElementCollection::dump(os);
|
ElementCollection::dump(os);
|
||||||
os << "}";
|
os << "}";
|
||||||
@@ -1727,9 +1716,8 @@ std::list<StateMachine*> Document::get_state_machines()
|
|||||||
|
|
||||||
std::ostream& Document::dump(std::ostream& os) const
|
std::ostream& Document::dump(std::ostream& os) const
|
||||||
{
|
{
|
||||||
os << "Document [" << format << "] {";
|
|
||||||
Element::dump(os);
|
Element::dump(os);
|
||||||
os << ", meta: {";
|
os << ", format: '" << format << "', meta: {";
|
||||||
std::list<String> params;
|
std::list<String> params;
|
||||||
if (!metainfo.standard_version.empty()) {
|
if (!metainfo.standard_version.empty()) {
|
||||||
params.push_back("standard version: '" + metainfo.standard_version + "'");
|
params.push_back("standard version: '" + metainfo.standard_version + "'");
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Document [Cyberiada-GraphML-1.0] {Element type: doc, id: '', name: 'Test document', meta: {standard version: '1.0', platform name: 'Berloga', platform version: '1.4', platform language: 'script', target system: 'Unit', name: 'Test document', author: 'Author', contact: 'platform@kruzhok.org', description: '1
|
Document: {id: '', name: 'Test document', format: 'Cyberiada-GraphML-1.0', meta: {standard version: '1.0', platform name: 'Berloga', platform version: '1.4', platform language: 'script', target system: 'Unit', name: 'Test document', author: 'Author', contact: 'platform@kruzhok.org', description: '1
|
||||||
2
|
2
|
||||||
3', version: '0.1', date: '2024-04-14 11:22', markup language: 'html', transition order: exit first, event propagation: propagate events}, elements: {State Machine {Element type: stm, id: 'G0', name: 'SM', elements: {Comment { formal, Element type: fco, id: 'nMeta', name: 'CGML_META', body: 'standardVersion/ 1.0
|
3', version: '0.1', date: '2024-04-14 11:22', markup language: 'html', transition order: exit first, event propagation: propagate events}, elements: {State Machine: {id: 'G0', name: 'SM', elements: {Formal Comment: {id: 'nMeta', name: 'CGML_META', body: 'standardVersion/ 1.0
|
||||||
|
|
||||||
platform/ Berloga
|
platform/ Berloga
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Document [Cyberiada-GraphML-1.0] {Element type: doc, id: '', name: 'Test document 2', meta: {standard version: '1.0', platform name: 'Berloga', platform version: '1.4', platform language: 'script', target system: 'Unit', name: 'Test document 2', author: 'Author', contact: 'platform@kruzhok.org', description: '1
|
Document: {id: '', name: 'Test document 2', format: 'Cyberiada-GraphML-1.0', meta: {standard version: '1.0', platform name: 'Berloga', platform version: '1.4', platform language: 'script', target system: 'Unit', name: 'Test document 2', author: 'Author', contact: 'platform@kruzhok.org', description: '1
|
||||||
2
|
2
|
||||||
3', version: '0.1', date: '2024-04-14 11:22', markup language: 'html', transition order: exit first, event propagation: propagate events}, elements: {State Machine {Element type: stm, id: 'G0', name: 'SM', elements: {Comment { formal, Element type: fco, id: 'nMeta', name: 'CGML_META', body: 'standardVersion/ 1.0
|
3', version: '0.1', date: '2024-04-14 11:22', markup language: 'html', transition order: exit first, event propagation: propagate events}, elements: {State Machine: {id: 'G0', name: 'SM', elements: {Formal Comment: {id: 'nMeta', name: 'CGML_META', body: 'standardVersion/ 1.0
|
||||||
|
|
||||||
platform/ Berloga
|
platform/ Berloga
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
Document [Cyberiada-GraphML-1.0] {Element type: doc, id: '', name: '', meta: {standard version: '1.0', transition order: transition first, event propagation: block events}, elements: {State Machine {Element type: stm, id: 'G0', name: 'SM1'}, State Machine {Element type: stm, id: 'G1', name: 'SM2'}}
|
Document: {id: '', name: '', format: 'Cyberiada-GraphML-1.0', meta: {standard version: '1.0', transition order: transition first, event propagation: block events}, elements: {State Machine: {id: 'G0', name: 'SM1'}, State Machine: {id: 'G1', name: 'SM2'}}
|
||||||
|
|||||||
Reference in New Issue
Block a user