/**
 * 最初の著者:: トゥイー
 * リポジトリ情報:: $Id: SAPIRecognition.hpp 61 2011-05-21 00:49:21Z yutaka_at_home $
 * 著作権:: Copyright (C) Ownway.info, 2011. All rights reserved.
 * ライセンス:: CPL(Common Public Licence)
 */

#ifndef _SPEECH_CONTROLLER_FRAMEWORK_SAPI_SAPI_RECOGNITION_HPP_
#define _SPEECH_CONTROLLER_FRAMEWORK_SAPI_SAPI_RECOGNITION_HPP_

#include "spcf/core/Recognition.hpp"

#include "spcf/sapi/utils/PhraseProperty.hpp"

#include <atlbase.h>
#include <sphelper.h>

#include <deque>
#include <string>

namespace spcf {

	class SAPIRecognition_i;

	class SAPIRecognition : public Recognition {
	private:
		SAPIRecognition_i* impl;

	public:
		/**
		 * 認識結果を構築します。
		 */
		SAPIRecognition(CSpEvent& event);

		/**
		 * 認識結果を破棄します。
		 */
		virtual ~SAPIRecognition();

	public:
		std::string getText();
		std::string getGrammarName();

	public:
		size_t sizeOfProperties() const;
		RecognitionPropertyIterator beginProperty();
		RecognitionPropertyConstIterator beginProperty() const;
		RecognitionPropertyIterator endProperty();
		RecognitionPropertyConstIterator endProperty() const;

	public:
		size_t sizeOfProperties(const std::string& name) const;
		RecognitionPropertyPtr getProperty(size_t index) const;
		RecognitionPropertyPtr getProperty(const std::string& name) const;
		RecognitionPropertyPtr getProperty(const std::string& name, size_t n) const;
	};

}  // namespace spcf

#endif
