...
...
Table of Contents |
---|
Preface
This page contains information about Decorators, also known as Object Model - convenient wrappers around raw, "flat" FixMessages. By using Decorators developers gain strongly typed access to all available properties of a message, that increases development speed (you write less code to read/write to message properties) and reduces the number of validation errors (because each decorated message class contains only properties that are relevant to this class).
...
To use Decorator you should:
Generate decorator files for your set of dictionaries, as described in tools/decorator-generator/readme.txt;
to
In examples below it is assumed that Decorator for standard FIX.4.4 is used and it's generated sources are placedin 'generated' folder,
using following command: b2b_fix_msgs_generator2.exe -s FIX44 -a FIX44 -o ../generated -f ../../../data/fixdic44.xmlInfo title Note In case of processing additional dictionary, the base dictionary should be place before additional one, e.g.:
b2b_fix_msgs_generator2.exe -s FIX44 -a FIX44 -o ../generated -f ../../../data/fixdic44.xml ../../../data/additional_fix44.xml
- Either add files from generated/src and generated/headers folders to your project, or build shared/static library from them;
- Optional. Add a folder for your convenience.
- Add generated files to project:
- Add path to generated headers as additional include directory:
- Add regular FIX Antenna library as dependency:
- Add preprocessor definitions:
- In case you are incorporating decorator sources in your application or static library, or if you are using decorator static library in your application, please add V12_DECORATOR_IMPL preprocessor definition.
- In case you are building shared library from decorator sources please add V12_DECORATOR_EXPORTS.
- In case you are building application with use of shared library from case ii - you need no additional definitions.
- Optional. Add a folder for your convenience.
- In your code add following includes:
#include <FixMessages/FIX44/AllMessages.h>
#include <FixMessages/FIX44/Tags.h>
#include <FixMessages/FIX44/Enums.h>
- Done! Now you can find FIX.4.4 Decorator API under
FixMessages::FIX44
namespace.
...