Skip to content
Snippets Groups Projects
Commit b41ee3ed authored by Patrick Dular's avatar Patrick Dular
Browse files

Change of Print Struct

parent 542645a4
No related branches found
No related tags found
No related merge requests found
...@@ -85,7 +85,7 @@ public: ...@@ -85,7 +85,7 @@ public:
const std::string & struct_name, const std::string & struct_namespace) const std::string & struct_name, const std::string & struct_namespace)
const const
{ {
str += "Struct "; str = "Struct ";
if (struct_namespace.size()) str += struct_namespace + "::"; if (struct_namespace.size()) str += struct_namespace + "::";
str += struct_name + " [ "; str += struct_name + " [ ";
bool flag_comma = false; bool flag_comma = false;
...@@ -185,18 +185,11 @@ public: ...@@ -185,18 +185,11 @@ public:
return 0; // 0: no error return 0; // 0: no error
} }
void sprint(std::string & str, const std::string & struct_namespace) const
{
for (Map_string_Struct::const_iterator it_st = this->get().begin();
it_st != this->get().end(); ++it_st )
it_st->second.sprint(str, it_st->first, struct_namespace);
}
void sprint(std::vector<std::string> & strs_out, const std::string & struct_namespace) const void sprint(std::vector<std::string> & strs_out, const std::string & struct_namespace) const
{ {
std::string str; std::string str;
for (Map_string_Struct::const_iterator it_st = this->get().begin(); for (Map_string_Struct::const_iterator it_st = this->get().begin();
it_st != this->get().end(); ++it_st ) { it_st != this->get().end(); ++it_st ) {
str.clear();
it_st->second.sprint(str, it_st->first, struct_namespace); it_st->second.sprint(str, it_st->first, struct_namespace);
strs_out.insert(strs_out.end(), str); strs_out.insert(strs_out.end(), str);
} }
...@@ -291,17 +284,12 @@ public: ...@@ -291,17 +284,12 @@ public:
return (structs_P && struct_P)? struct_P->getMember_ValMax() : -1; return (structs_P && struct_P)? struct_P->getMember_ValMax() : -1;
} }
void sprint(std::string & str) const
{
for (Map_string_Structs::const_iterator it_ns = this->get().begin();
it_ns != this->get().end(); ++it_ns )
it_ns->second.sprint(str, it_ns->first);
}
void sprint(std::vector<std::string> & strs_out) const void sprint(std::vector<std::string> & strs_out) const
{ {
std::vector<std::string> strs; std::vector<std::string> strs;
for (Map_string_Structs::const_iterator it_ns = this->get().begin(); for (Map_string_Structs::const_iterator it_ns = this->get().begin();
it_ns != this->get().end(); ++it_ns ) { it_ns != this->get().end(); ++it_ns ) {
strs.clear();
it_ns->second.sprint(strs, it_ns->first); it_ns->second.sprint(strs, it_ns->first);
strs_out.insert(strs_out.end(), strs.begin(), strs.end()); strs_out.insert(strs_out.end(), strs.begin(), strs.end());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment