diff options
author | Erik Verbruggen <erik.verbruggen@theqtcompany.com> | 2015-03-24 13:33:01 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@theqtcompany.com> | 2015-03-30 11:42:05 +0300 |
commit | f25ccf40e959da4926ce52eabc47e3e905a6278e (patch) | |
tree | 5565eccbabe20d943fcb7c12b35bad3fdc28ec72 /.gitignore | |
parent | 99491295b5d250c5f73967613c44a0ebff880a9e (diff) |
ID mangling for C++ names.
The XML IDs can have a couple of characters that C++ can't grok as
identifier names, so those IDs have to be mangled. We can't simply
replace all illegal characters with e.g. an underscore, because that
could easily create conflicts. For example: id="a:b" and id="a_b" would
suddenly have the same name.
So, the following patterns are used:
"_" -> "__"
":" -> "_colon_"
"-" -> "_dash_"
"@" -> "_at_"
This mangling does not affect the objectName.
Change-Id: I2ba5e4b736fb0e7e9cc3767036f8aaba8a1876b3
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to '.gitignore')
-rw-r--r-- | .gitignore | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -12,3 +12,4 @@ moc_*.cpp /src/qscxmlcpp/qscxmlcpp /tests/testCpp/testCpp +tst_cppgen |