1How to add a new binary filter 2============================== 3 41. Creating source files 5------------------------ 6Copy the template files "template_bytearrayfilter.*" from 7 okteta/kasten/controllers/view/libbytearrayfilter/filter/template/ 8to 9 okteta/kasten/controllers/view/libbytearrayfilter/filter 10using a new file name matching the class name, 11e.g. for "MyByteArrayFilter" use "mybytearrayfilter.*". 12 13 142. Adapting the code from the template 15-------------------------------------- 16In the templates the ranges where you need to do the changes are marked with 17//// ADAPT(start) 18//// ADAPT(end) 19Follow the advises given at the beginning of each range, and use 20"NoByteArrayFilterParameterSet" as the parameter set. 21 22 233. Adding the filter to the library 24----------------------------------- 25Grep these files for the string "NEWFILTER" to find where you need to make 26changes to add your binary filter, and follow the advises given there: 27 okteta/kasten/controllers/CMakeLists.txt 28 okteta/kasten/controllers/view/libbytearrayfilter/bytearrayfilterfactory.cpp 29 30 314. Compile, install and run 32----------------------------------- 33Now you are ready to enter the cycle of compile, test, and fix. Do so :) 34 35 365. Share your results 37--------------------- 38If you are pleased with your results, contact the maintainer of Okteta, as found 39in the "About Okteta" dialog, for inclusion in the official sources. 40 41 42TODO: A test system to make sure your filter does what it is supposed to. 43 44 45 46How to add a new binary filter with new parameterset 47==================================================== 48 490. Create a binary filter with fixed parameters 50----------------------------------------------- 51As a start do the steps 1.-4, as described above and just set the parameters to fixed values, 52until the filter basically works. 53 54 551. Creating source files 56------------------------ 57Copy the template files "template_bytearrayfilterparameterset{,edit}.*" from 58 okteta/kasten/controllers/view/libbytearrayfilter/filter/template/ 59to 60 okteta/kasten/controllers/view/libbytearrayfilter/filter 61using a new file name matching the class name, 62e.g. for "MyByteArrayFilterParameterSet" use "mybytearrayfilterparameterset{,edit}.*". 63 64 652. Adapting the code from the template 66-------------------------------------- 67In the templates the ranges where you need to do the changes are marked with 68//// ADAPT(start) 69//// ADAPT(end) 70Follow the advises given at the beginning of each range. 71 72 733. Adding the parameterset to the library 74----------------------------------------- 75Grep these files for the string "NEWFILTERPARAMETERSET" to find where you need to make 76changes to add your binary filter, and follow the advises given there: 77 okteta/kasten/controllers/CMakeLists.txt 78 okteta/kasten/controllers/view/libbytearrayfilter/bytearrayfilterparameterseteditfactory.cpp 79 80Also change your filter to now make use of the parameter set, by switching from 81"NoByteArrayFilterParameterSet" to the one you have created and adapt the "filter()" method 82of your filter class to take the actual parameter from the parameter set instead of using 83the fixed values as done for the start. 84 85 864. Compile, install and run 87----------------------------------- 88Now you are ready to enter the cycle of compile, test, and fix. Do so :) 89 90 915. Share your results 92--------------------- 93If you are pleased with your results, contact the maintainer of Okteta, as found 94in the "About Okteta" dialog, for inclusion in the official sources. 95