cpp-rest-sdk-client.api-header.mustache Maven / Gradle / Ivy
{{>licenseInfo}}
{{#operations}}/*
* {{classname}}.h
*
* {{description}}
*/
#ifndef {{apiHeaderGuardPrefix}}_{{classname}}_H_
#define {{apiHeaderGuardPrefix}}_{{classname}}_H_
{{{defaultInclude}}}
#include "../ApiClient.h"
{{#imports}}{{{import}}}
{{/imports}}
{{^hasModelImport}}#include "../ModelBase.h"{{/hasModelImport}}
#include
{{#apiNamespaceDeclarations}}
namespace {{this}} {
{{/apiNamespaceDeclarations}}
using namespace {{modelNamespace}};
{{#gmockApis}}
class {{declspec}} I{{classname}}
{
public:
I{{classname}}() = default;
virtual ~I{{classname}}() = default;
{{#operation}}
virtual pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {{operationId}}(
{{#allParams}}
{{^required}}boost::optional<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{#hasMore}},{{/hasMore}}
{{/allParams}}
) const = 0;
{{/operation}}
};{{/gmockApis}}
class {{declspec}} {{classname}} {{#gmockApis}} : public I{{classname}} {{/gmockApis}}
{
public:
{{#gmockApis}}
using Base = I{{classname}};
{{/gmockApis}}
explicit {{classname}}( std::shared_ptr apiClient );
{{#gmockApis}}
~{{classname}}() override;
{{/gmockApis}}
{{^gmockApis}}
virtual ~{{classname}}();
{{/gmockApis}}
{{#operation}}
///
/// {{summary}}
///
///
/// {{notes}}
///
{{#allParams}}
/// {{#lambda.multiline_comment_4}}{{description}}{{/lambda.multiline_comment_4}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
{{/allParams}}
pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {{operationId}}(
{{#allParams}}
{{^required}}boost::optional<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{#hasMore}},{{/hasMore}}
{{/allParams}}
) const{{#gmockApis}} override{{/gmockApis}};
{{/operation}}
protected:
std::shared_ptr m_ApiClient;
};
{{#apiNamespaceDeclarations}}
}
{{/apiNamespaceDeclarations}}
#endif /* {{apiHeaderGuardPrefix}}_{{classname}}_H_ */
{{/operations}}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy