- added DEFAULT_START_WORD
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@858 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+9
-2
@@ -16,6 +16,8 @@
|
||||
using namespace std;
|
||||
using namespace arma;
|
||||
|
||||
static const char *DEFAULT_START_WORD = "CHAP";
|
||||
|
||||
class RbmListener : public Rbm::IListener
|
||||
{
|
||||
public:
|
||||
@@ -40,7 +42,7 @@ class RbmListener : public Rbm::IListener
|
||||
std::cout << "L1 = " << status.L1 << std::endl;
|
||||
std::cout << "L2 = " << status.L2 << std::endl;
|
||||
m_last_progress = status.progress;
|
||||
forward("Chap");
|
||||
forward(DEFAULT_START_WORD);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -157,7 +159,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (command == Command::Forward)
|
||||
{
|
||||
char *start = argv[2];
|
||||
std::string start(DEFAULT_START_WORD);
|
||||
|
||||
if (argv[2] != nullptr)
|
||||
{
|
||||
start = std::string(argv[2]);
|
||||
}
|
||||
listener.forward(start);
|
||||
}
|
||||
printf("\nEnd of program\n");
|
||||
|
||||
Reference in New Issue
Block a user