<commit_before>${event.name}.hpp
/* Autogenerated with kurento-module-creator */

#ifndef __${camelToUnderscore(event.name)}_HPP__
#define __${camelToUnderscore(event.name)}_HPP__

#include <jsoncpp/json/json.h>
#include <memory>

<#if event.extends??>
#include "${event.extends.name}.hpp"
</#if>

namespace kurento
{

class JsonSerializer;
<#list event.properties as property>
<#if module.remoteClasses?seq_contains(property.type.type) ||
  module.complexTypes?seq_contains(property.type.type) ||
  module.events?seq_contains(property.type.type)>
class ${property.type.name};
</#if>
</#list>

class ${event.name}<#if event.extends??> : public virtual ${event.extends.name}</#if>
{

public:

  ${event.name} (<#rt>
    <#lt><#assign first = true><#rt>
    <#lt><#list event.properties as property><#rt>
      <#lt><#if !property.optional><#rt>
        <#lt><#if !first>, </#if><#rt>
        <#lt><#assign first = false><#rt>
        <#lt>${getCppObjectType(property.type.name)}${property.name}<#rt>
      <#lt></#if><#rt>
    <#lt></#list><#rt>
    <#lt><#list event.parentProperties as property><#rt>
      <#lt><#if !property.optional><#rt>
        <#lt><#if !first>, </#if><#rt>
        <#lt><#assign first = false><#rt>
        <#lt>${getCppObjectType(property.type.name)}${property.name}<#rt>
      <#lt></#if><#rt>
    <#lt></#list>)<#rt>
    <#lt><#assign first = true><#rt>
    <#lt><#if event.extends??> : ${event.extends.name} (<#rt>
      <#lt><#list event.parentProperties as property><#rt>
        <#lt><#if !property.optional><#rt>
          <#lt><#if !first>, </#if><#rt>
          <#lt><#assign first = false><#rt>
          <#lt>${property.name}<#rt>
        <#lt></#if><#rt>
    <#lt></#list>)</#if> {
    <#list event.properties as property><#rt>
      <#lt><#if !property.optional><#rt>
    this->${property.name} = ${property.name};
      </#if><#rt>
    <#lt></#list>
  };

  ${event.name} (const Json::Value &value);

  <#list event.properties as property>
  virtual void set${property.name?cap_first} (${getCppObjectType(property.type.name, true)}${property.name}) {
    this->${property.name} = ${property.name};
    <#if property.optional>
    _isSet${property.name?cap_first} = true;
    </#if>
  };

  virtual ${getCppObjectType(property.type.name)}get${property.name?cap_first} () {
    return ${property.name};
  };

  <#if property.optional>
  virtual bool isSet${property.name?cap_first} () {
    return _isSet${property.name?cap_first};
  };

  </#if>
  </#list>
  static std::string getName() {
    return "${event.name}";
  }

  virtual void Serialize (JsonSerializer &s);

protected:

  ${event.name}() {};

private:
  <#list event.properties as property>
  ${getCppObjectType(property.type.name, false)} ${property.name};<commit_msg>Fix bug in events with a list of elements as property<commit_after>${event.name}.hpp
/* Autogenerated with kurento-module-creator */

#ifndef __${camelToUnderscore(event.name)}_HPP__
#define __${camelToUnderscore(event.name)}_HPP__

#include <jsoncpp/json/json.h>
#include <memory>

<#if event.extends??>
#include "${event.extends.name}.hpp"
</#if>

namespace kurento
{

class JsonSerializer;
<#list event.properties as property>
<#if module.remoteClasses?seq_contains(property.type.type) ||
  module.complexTypes?seq_contains(property.type.type) ||
  module.events?seq_contains(property.type.type)>
class ${property.type.name};
</#if>
</#list>

class ${event.name}<#if event.extends??> : public virtual ${event.extends.name}</#if>
{

public:

  ${event.name} (<#rt>
    <#lt><#assign first = true><#rt>
    <#lt><#list event.properties as property><#rt>
      <#lt><#if !property.optional><#rt>
        <#lt><#if !first>, </#if><#rt>
        <#lt><#assign first = false><#rt>
        <#lt>${getCppObjectType(property.type)}${property.name}<#rt>
      <#lt></#if><#rt>
    <#lt></#list><#rt>
    <#lt><#list event.parentProperties as property><#rt>
      <#lt><#if !property.optional><#rt>
        <#lt><#if !first>, </#if><#rt>
        <#lt><#assign first = false><#rt>
        <#lt>${getCppObjectType(property.type)}${property.name}<#rt>
      <#lt></#if><#rt>
    <#lt></#list>)<#rt>
    <#lt><#assign first = true><#rt>
    <#lt><#if event.extends??> : ${event.extends.name} (<#rt>
      <#lt><#list event.parentProperties as property><#rt>
        <#lt><#if !property.optional><#rt>
          <#lt><#if !first>, </#if><#rt>
          <#lt><#assign first = false><#rt>
          <#lt>${property.name}<#rt>
        <#lt></#if><#rt>
    <#lt></#list>)</#if> {
    <#list event.properties as property><#rt>
      <#lt><#if !property.optional><#rt>
    this->${property.name} = ${property.name};
      </#if><#rt>
    <#lt></#list>
  };

  ${event.name} (const Json::Value &value);

  <#list event.properties as property>
  virtual void set${property.name?cap_first} (${getCppObjectType(property.type, true)}${property.name}) {
    this->${property.name} = ${property.name};
    <#if property.optional>
    _isSet${property.name?cap_first} = true;
    </#if>
  };

  virtual ${getCppObjectType(property.type)}get${property.name?cap_first} () {
    return ${property.name};
  };

  <#if property.optional>
  virtual bool isSet${property.name?cap_first} () {
    return _isSet${property.name?cap_first};
  };

  </#if>
  </#list>
  static std::string getName() {
    return "${event.name}";
  }

  virtual void Serialize (JsonSerializer &s);

protected:

  ${event.name}() {};

private:
  <#list event.properties as property>
  ${getCppObjectType(property.type, false)} ${property.name};
{'fraction_non_alphanumeric': 0.2223222322232223, 'fraction_numerical': 0.0, 'mean_word_length': 4.014440433212997, 'pattern_counts': {'":': 0, '<': 201, '<?xml version=': 0, '>': 205, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2647160', 'n_tokens_mistral': 2061, 'n_tokens_neox': 2032, 'n_words': 329}