summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Volz <andreas@er00923n.(none)>2011-02-14 23:30:23 +0100
committerAndreas Volz <andreas@er00923n.(none)>2011-02-14 23:30:23 +0100
commitf9e5171acefec586412f99bfad5896078feec59c (patch)
tree381810a5ccc3543f837967848558005339655f83
parent796c96d34e10337a784a04200894f208ecde4e59 (diff)
downloaddbus-c++-f9e5171acefec586412f99bfad5896078feec59c.tar.gz
deleted some old commented code
-rw-r--r--tools/generator_utils.cpp98
1 files changed, 3 insertions, 95 deletions
diff --git a/tools/generator_utils.cpp b/tools/generator_utils.cpp
index 3c121af..c984959 100644
--- a/tools/generator_utils.cpp
+++ b/tools/generator_utils.cpp
@@ -122,11 +122,11 @@ void _parse_signature(const string &signature, string &type, unsigned int &i)
type += "std::vector< ";
_parse_signature(signature, type, i);
- type += " >";
+ type += " >";
break;
}
- }
+ }
if (i+1 < signature.length() && signature[i+1] != ')' && signature[i+1] != '}')
{
@@ -154,104 +154,12 @@ void _parse_signature(const string &signature, string &type, unsigned int &i)
{
type += ", ";
}
- break;
- }
- }
- }
-}
-
-/*{
- for (; i < signature.length(); ++i)
- {
- cout << "i: " << i << ", sig(i): " << signature[i] << endl;
- cout << "Type: " << type << endl;
-
- switch (signature[i])
- {
- case 'a':
- {
- bool multi = false;
- switch (signature[++i])
- {
- case '{':
- {
- type += "std::map< ";
- const char *atom = atomic_type_to_string(signature[++i]);
- if (!atom)
- {
- cerr << "invalid signature" << endl;
- exit(-1);
- }
- type += atom;
- type += ", ";
- ++i;
- _parse_signature(signature, type, i);
- multi = true;
- break;
- }
- default:
- {
- type += "std::vector< ";
- _parse_signature(signature, type, i);
- type += " >V";
- multi = true;
- break;
- }
- }
- if (!multi)
- {
- _parse_signature(signature, type, i);
- }
- cout << "signature1: " << signature << endl;
- cout << "type1: " << type << endl;
- cout << "i1: " << i << ", sig(i): " << signature[i-1] << endl;
-
- continue;
- }
- case '(':
- {
- type += "::DBus::Struct< ";
- ++i;
- _parse_signature(signature, type, i);
- type += " >S";
- cout << "signature2: " << signature << endl;
- cout << "type2: " << type << endl;
- cout << "i2: " << i << ", sig(i): " << signature[i] << endl;
- if ((i+1 < signature.length()) && (signature[i+1] != ')') )
- {
- type += ", ";
- }
- continue;
- }
- case ')':
- case '}':
- {
- type += " >?";
- cout << "close tag>" << endl;
- cout << "type3: " << type << endl;
-
- return;
- }
- default:
- {
- const char *atom = atomic_type_to_string(signature[i]);
- if (!atom)
- {
- cerr << "invalid signature" << endl;
- exit(-1);
- }
- type += atom;
-
- if (i+1 < signature.length() && signature[i+1] != ')' && signature[i+1] != '}')
- {
- type += ", ";
- }
break;
}
}
}
-}*/
+}
string signature_to_type(const string &signature)
{