Skip to content

Commit

Permalink
issue #35 renamed Interfaces folder to include and introduced a new type
Browse files Browse the repository at this point in the history
for modalities
  • Loading branch information
schnelle committed Jan 27, 2024
1 parent dbdfb06 commit d93718b
Show file tree
Hide file tree
Showing 27 changed files with 388 additions and 241 deletions.
4 changes: 2 additions & 2 deletions source/w3cipa/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.24)
cmake_minimum_required(VERSION 3.24)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")

include(FindPkgConfig)
Expand Down Expand Up @@ -58,6 +58,6 @@ include_directories(${CURL_INCLUDE_DIR})

set(requiredlibs ${requiredlibs} ${CURL_LIBRARIES})

include_directories(Interfaces)
include_directories(include)

add_subdirectory(sources)

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

88 changes: 88 additions & 0 deletions source/w3cipa/include/w3c/voiceinteraction/ipa/ModalityType.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@

#if !defined(MODAILTYTYPE_H)
#define MODAILTYTYPE_H

#include <string>

namespace w3c {
namespace voiceinteraction {
namespace ipa {

/**
* The SessionId interface is used to identify a session.
*/
class ModalityType {
public:
/**
* Contructs a new ModalityType.
* @param modalityType A human readable string identifying the modality
* type.
*/
ModalityType(const std::string& modalityType)
: modalityType(modalityType) {
}

/**
* Copy constructor.
* @param other the other modality to copy from.
*/
ModalityType(const ModalityType& other)
: modalityType(other.getModalityType()) {
}

/**
* Destroys the object.
*/
virtual ~ModalityType() {
}

/**
* Returns the modality type.
* @return The modality type.
*/
const std::string& getModalityType() const {
return modalityType;
}

/**
* @brief operator <
* Comparison to allow for usage in {@code std::map}s.
* @param other the other modality
* @return {@code true} in case the
* {@code getModalityType() < other.getModalityType()}.
*/
bool operator<(const ModalityType& other) const
{
return modalityType < other.getModalityType();
}

/**
* @brief operator =
* @param other the other modality
*/
void operator=(const ModalityType& other) {
modalityType = other.getModalityType();
}

/**
* @brief operator ==
* @param other the other modality
* @return {@code true} in case the
* {@code getModalityType() == other.getModalityType()}.
*/
bool operator==(const ModalityType& other) const {
return modalityType == other.getModalityType();
}

private:
/** A human readable string identifying the modality type. */
std::string modalityType;

};


} // namespace ipa
} // namespace voiceinteraction
} // namespace w3c

#endif // !defined(MODAILTYTYPE_H)
Loading

0 comments on commit d93718b

Please sign in to comment.