Warning, /utilities/okteta/kasten/controllers/view/libbytearrayfilter/README_developers.md is written in an unsupported language. File is not indexed.

0001 # How to add a new binary filter
0002 
0003 ### 1. Creating source files
0004 
0005 Copy the template files `template_bytearrayfilter.*` from  
0006     [okteta/kasten/controllers/view/libbytearrayfilter/filter/template/](filter/template/)  
0007 to  
0008     [okteta/kasten/controllers/view/libbytearrayfilter/filter/](filter/)  
0009 using new file names matching the class name.
0010 E.g. for `MyByteArrayFilter` use `mybytearrayfilter.*`.
0011 
0012 
0013 ### 2. Adapting the code from the template
0014 
0015 In the templates the ranges where you need to do the changes are marked with
0016 ```cpp
0017 //// ADAPT(start)
0018 //// ADAPT(end)
0019 ```
0020 Follow the advises given at the beginning of each range, and use
0021 `NoByteArrayFilterParameterSet` as the parameter set.
0022 
0023 
0024 ### 3. Adding the filter to the library
0025 
0026 Grep these files for the string `NEWFILTER` to find where you need to make
0027 changes to add your binary filter, and follow the advises given there:
0028 *  [okteta/kasten/controllers/CMakeLists.txt](../../CMakeLists.txt)
0029 *  [okteta/kasten/controllers/view/libbytearrayfilter/bytearrayfilterfactory.cpp](bytearrayfilterfactory.cpp)
0030 
0031 
0032 ### 4. Compile, install and run
0033 
0034 Now you are ready to enter the cycle of compile, test, and fix. Do so :)
0035 
0036 
0037 ### 5. Share your results
0038 
0039 If you are pleased with your results, contact the maintainer of Okteta, as found
0040 in the "About Okteta" dialog, for inclusion in the official sources.
0041 
0042 
0043 TODO: A test system to make sure your filter does what it is supposed to.
0044 
0045 
0046 
0047 # How to add a new binary filter with new parameterset
0048 
0049 ### 0. Create a binary filter with fixed parameters
0050 
0051 As a start do the steps 1.-4, as described above and just set the parameters to fixed values,
0052 until the filter basically works.
0053 
0054 
0055 ### 1. Creating source files
0056 
0057 Copy the template files   `template_bytearrayfilterparameterset{,edit}.*` from
0058     [okteta/kasten/controllers/view/libbytearrayfilter/filter/template/](filter/template/)  
0059 to  
0060     [okteta/kasten/controllers/view/libbytearrayfilter/filter/](filter/)  
0061 using new file names matching the class name.
0062 E.g. for `MyByteArrayFilterParameterSet` use `mybytearrayfilterparameterset{,edit}.*`.
0063 
0064 
0065 ### 2. Adapting the code from the template
0066 
0067 In the templates the ranges where you need to do the changes are marked with
0068 ```cpp
0069 //// ADAPT(start)
0070 //// ADAPT(end)
0071 ```
0072 Follow the advises given at the beginning of each range.
0073 
0074 
0075 ### 3. Adding the parameterset to the library
0076 
0077 Grep these files for the string `NEWFILTERPARAMETERSET` to find where you need to make
0078 changes to add your binary filter, and follow the advises given there:
0079 * [okteta/kasten/controllers/CMakeLists.txt](../../CMakeLists.txt)
0080 * [okteta/kasten/controllers/view/libbytearrayfilter/bytearrayfilterparameterseteditfactory.cpp](bytearrayfilterparameterseteditfactory.cpp)
0081 
0082 Also change your filter to now make use of the parameter set, by switching from
0083 `NoByteArrayFilterParameterSet` to the one you have created and adapt the `filter()` method
0084 of your filter class to take the actual parameter from the parameter set instead of using
0085 the fixed values as done for the start.
0086 
0087 
0088 ### 4. Compile, install and run
0089 
0090 Now you are ready to enter the cycle of compile, test, and fix. Do so :)
0091 
0092 
0093 ### 5. Share your results
0094 
0095 If you are pleased with your results, contact the maintainer of Okteta, as found
0096 in the "About Okteta" dialog, for inclusion in the official sources.