Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dphan/extracting protocol format #42

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
add method to OLinkContent
dorotaphanSiili committed Oct 25, 2023
commit baca87e908214c72ced21873aa02886975ff7c40
6 changes: 5 additions & 1 deletion src/olink/core/olinkcontent.h
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ bool OLINK_EXPORT operator==(const OLinkContent& lhs, const OLinkContent& rhs);

// If content always come as array this is not needed
template<typename ValueType>
OLinkContent invokeReturnValue(ValueType value)
OLinkContent invokeReturnValue(const ValueType& value)
{
OLinkContent content;
content.content = nlohmann::json(value);
@@ -127,6 +127,10 @@ struct OLinContentStreamReader
arg = m_content.content[currentIndex].get<ArgType>();
currentIndex++;
}
size_t argumentsCount()
{
return m_content.content.size();
}

private:
const OLinkContent& m_content;