Skip to content

Commit

Permalink
issue #35 introduced a new type for malities
Browse files Browse the repository at this point in the history
  • Loading branch information
schnelle committed Jan 27, 2024
1 parent d93718b commit 4d203de
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#include "TextMultiModalInput.h"
#include "TextModalityType.h"
#include "TextMultiModalInput.h"

namespace w3c {
namespace voiceinteraction {
namespace ipa {

const std::string TextMultiModalInput::MODALITY = std::string("text");
const ModalityType TextMultiModalInput::MODALITY = TextModalityType();

TextMultiModalInput::TextMultiModalInput(const std::string& output)
: text(output) {
TextMultiModalInput::TextMultiModalInput(const std::string& input)
: MultiModalInput(MODALITY),
text(input) {
}

} // namespace ipa
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef TEXTMULTIMODALINPUT_H
#ifndef TEXTMULTIMODALINPUT_H
#define TEXTMULTIMODALINPUT_H

#include <string>
Expand All @@ -13,15 +13,11 @@ class TextMultiModalInput : public MultiModalInput {
public:
TextMultiModalInput(const std::string& input);

virtual const std::string getModality() const {
return MODALITY;
};

const std::string& getTextInput() const {
return text;
}

const static std::string MODALITY;
const static ModalityType MODALITY;
private:
std::string text;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#include "TextMultiModalOutput.h"
#include "TextModalityType.h"
#include "TextMultiModalOutput.h"

namespace w3c {
namespace voiceinteraction {
namespace ipa {

const std::string TextMultiModalOutput::MODALITY = std::string("text");
const ModalityType TextMultiModalOutput::MODALITY = TextModalityType();

TextMultiModalOutput::TextMultiModalOutput(const std::string& output)
: text(output) {
: MultiModalOutput(MODALITY),
text(output) {
}

} // namespace ipa
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef TEXTMULTMODALOUTPUT_H
#ifndef TEXTMULTMODALOUTPUT_H
#define TEXTMULTMODALOUTPUT_H

#include <string>
Expand All @@ -13,15 +13,11 @@ class TextMultiModalOutput : public MultiModalOutput {
public:
TextMultiModalOutput(const std::string& output);

virtual const std::string getModality() const {
return MODALITY;
};

const std::string& getTextOutput() const {
return text;
}

const static std::string MODALITY;
const static ModalityType MODALITY;
private:
std::string text;
};
Expand Down

0 comments on commit 4d203de

Please sign in to comment.