Summary: | Add support for annotation of values | ||
---|---|---|---|
Product: | [Applications] okteta | Reporter: | Brad Hards <bradh> |
Component: | Structures Tool | Assignee: | Alex Richardson <arichardson.kde> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | kossebau |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/okteta/75df4af37e02d94e83758397f965eba2efc3e8cf | Version Fixed In: | |
Sentry Crash Report: |
Description
Brad Hards
2011-01-18 00:14:58 UTC
Added to my TODO list, Do you think it would be useful to be able to define the formatting of the enum value e.g. like this "%x (Free sector)" or "Free sector (value=%x)" and maybe %d for decimal or would it suffice to always have the value follwed by the enum constant name? Since this is not much work to implement, the chances are high it will make it into the next version :) I think that value followed by enum constant name (if present) would be sufficient. I can see that a more flexible display system would be (a little) better, because you can separate the internal format (16 bit value) from the display (signed 16 bit integer vs unsigned 16 bit integer vs 16 bit enum vs 16 bit flags vs wide character) but I'm not sure if the impact of existing tools would be worth the pain. Git commit 75df4af37e02d94e83758397f965eba2efc3e8cf by Alex Richardson. Committed on 13/03/2013 at 00:32. Pushed by arichardson into branch 'master'. structures: allow custom string representations of values + unit test Also install a script that allows creating UUID/GUID structures with such a custom to string function. It can be used by writing this: var x = importScript('uuid.js') var myUUID = x.UUID() var myGUID = x.GUID() Related: bug 263496 M +3 -1 kasten/controllers/CMakeLists.txt A +100 -0 kasten/controllers/test/customtostringtest.cpp [License: LGPL (v2.1+)] A +36 -0 kasten/controllers/test/resources/okteta/structures/uuid.js M +13 -0 kasten/controllers/test/testutils.h M +1 -1 kasten/controllers/view/structures/datatypes/additionaldata.h M +12 -1 kasten/controllers/view/structures/datatypes/datainformation.cpp M +17 -3 kasten/controllers/view/structures/datatypes/datainformation.h M +10 -0 kasten/controllers/view/structures/parsers/datainformationfactory.cpp M +2 -1 kasten/controllers/view/structures/parsers/datainformationfactory.h M +1 -0 kasten/controllers/view/structures/parsers/osdparser.cpp M +1 -0 kasten/controllers/view/structures/parsers/parserutils.h M +1 -0 kasten/controllers/view/structures/parsers/scriptvalueconverter_p.cpp M +13 -8 kasten/controllers/view/structures/script/classes/defaultscriptclass.cpp M +1 -0 kasten/controllers/view/structures/script/classes/defaultscriptclass.h M +14 -0 kasten/controllers/view/structures/script/scripthandler.cpp M +1 -0 kasten/controllers/view/structures/script/scripthandler.h M +2 -1 kasten/controllers/view/structures/script/scripthandlerinfo.h http://commits.kde.org/okteta/75df4af37e02d94e83758397f965eba2efc3e8cf |