267
edits
No edit summary |
No edit summary |
||
Line 56: | Line 56: | ||
* object and viceversa | * object and viceversa | ||
* | * | ||
* @param formatter | * @param formatter formatter object that manages the format type that codec | ||
* will use | * will use | ||
*/ | */ | ||
void SetFormatter( | void SetFormatter(std::shared_ptr<libmisb::formatter::iFormatter> formatter); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
'''Use case''': | '''Use case''': | ||
Remeber to include the formatter header in your code: | |||
<syntaxhighlight lang=C> | <syntaxhighlight lang=C> | ||
#include "libmisb/formatter/jsonformatter.hpp" | |||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang=C> | <syntaxhighlight lang=C> | ||
libmisb::LibMisb libmisb; | |||
std::shared_ptr<libmisb::formatter::iFormatter> json_formatter = std::make_shared<libmisb::formatter::JsonFormatter>(); | |||
libmisb.SetFormatter(json_formatter); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Encode === | === Encode === |
edits