• R/O
  • SSH
  • HTTPS

hands-free: 提交


Commit MetaInfo

修订版67 (tree)
时间2011-05-22 15:19:03
作者(del#42492)

Log Message

単純な計算機のサンプルを通して、プロパティのバグを発見し、修正した。

更改概述

差异

--- trunk/main/app/sample/calculator1/main.cpp (revision 66)
+++ trunk/main/app/sample/calculator1/main.cpp (revision 67)
@@ -66,15 +66,15 @@
6666
6767 class CalculatorView : public DefaultView {
6868 void start(Context& context) {
69- cout << "start";
69+ cout << "start" << endl;
7070 }
7171
7272 void soundStarted(Context& context) {
73- cout << "soundStarted";
73+ cout << "soundStarted" << endl;
7474 }
7575
7676 void soundStoped(Context& context) {
77- cout << "soundStoped";
77+ cout << "soundStoped" << endl;
7878 }
7979
8080 void recognized(Context& context, Recognition& recognition) {
@@ -92,6 +92,7 @@
9292 } else if (op == "/") {
9393 cout << (double(number1) / double(number2));
9494 }
95+ cout << endl;
9596 }
9697 };
9798
--- trunk/main/sapi/src/spcf/sapi/utils/Phrase.cpp (revision 66)
+++ trunk/main/sapi/src/spcf/sapi/utils/Phrase.cpp (revision 67)
@@ -92,13 +92,13 @@
9292 phrase_(phrase->getPhrase()) {
9393 if (phrase->hasProperty()) {
9494 if (phrase->hasPropertyInt() && phrase->hasPropertyString()) {
95- property_ = PhrasePropertyPtr(new PhraseProperty(phrase->getPhrase(), phrase->getPropertyInt(), phrase->getPropertyString()));
95+ property_ = PhrasePropertyPtr(new PhraseProperty(phrase->getPropertyName(), phrase->getPropertyInt(), phrase->getPropertyString()));
9696 } else if (phrase->hasPropertyInt()) {
97- property_ = PhrasePropertyPtr(new PhraseProperty(phrase->getPhrase(), phrase->getPropertyInt()));
97+ property_ = PhrasePropertyPtr(new PhraseProperty(phrase->getPropertyName(), phrase->getPropertyInt()));
9898 } else if (phrase->hasPropertyString()) {
99- property_ = PhrasePropertyPtr(new PhraseProperty(phrase->getPhrase(), phrase->getPropertyString()));
99+ property_ = PhrasePropertyPtr(new PhraseProperty(phrase->getPropertyName(), phrase->getPropertyString()));
100100 } else {
101- property_ = PhrasePropertyPtr(new PhraseProperty(phrase->getPhrase()));
101+ property_ = PhrasePropertyPtr(new PhraseProperty(phrase->getPropertyName()));
102102 }
103103 }
104104 }
Show on old repository browser