org.micropsi.common.consoleservice
Interface ConsoleQuestionTypeIF

All Known Implementing Classes:
QTypeChangeBodyData, QTypeChangeDebugSource, QTypeChangeInnerState, QTypeChangeObjectProperties, QTypeCreateObject, QTypeCreateWorldMessage, QTypeCycleSuspendedNet, QTypeDeleteAgentState, QTypeDie, QTypeGetAgentList, QTypeGetAgentList, QTypeGetAgentObjectId, QTypeGetAgentStateMetadataPath, QTypeGetAgentStates, QTypeGetAgentStatistics, QTypeGetBodyData, QTypeGetComponentDescriptor, QTypeGetCurrentAgentState, QTypeGetCycleLength, QTypeGetEnvironment, QTypeGetExistingWorldFiles, QTypeGetFileName, QTypeGetGlobalData, QTypeGetInfo, QTypeGetInfoString, QTypeGetInfoString, QTypeGetInnerStates, QTypeGetLocalNet, QTypeGetObjectChangeList, QTypeGetObjectInfoString, QTypeGetObjectList, QTypeGetObjectListString, QTypeGetObjectProperties, QTypeGetObjectTypes, QTypeGetRunnerLog, QTypeGetScriptingManager, QTypeGetSituation, QTypeGetStatusString, QTypeGetWorldType, QTypeLoadAgentState, QTypeLoadWorld, QTypeReleaseLock, QTypeRemoveObject, QTypeRenameAgentState, QTypeRequestLock, QTypeResetWorld, QTypeResumeNet, QTypeSaveAgentState, QTypeSaveWorld, QTypeSetCycleLength, QTypeSetDynamicLevel, QTypeSetSimulationsSpeed, QTypeSuspendNet, QTypeSwitchSync

public interface ConsoleQuestionTypeIF


Method Summary
 AnswerIF answerQuestion(AnswerFactoryIF factory, QuestionIF question, long step)
          Answers a question.
 java.lang.String getQuestionName()
          Returns the question name.
 

Method Detail

getQuestionName

public java.lang.String getQuestionName()
Returns the question name. It is important that this name be unique, as the consoleservice will chose the questionType by the return value of this method when it is about to answer a question. The returned value must not change during runtime.

Returns:
the name of the question

answerQuestion

public AnswerIF answerQuestion(AnswerFactoryIF factory,
                               QuestionIF question,
                               long step)
Answers a question. The answer object should be auto-generated by the factory passed to this method, using the given question and step.

Parameters:
factory - The AnswerFactoryIF to be used for the creation of the answer
question - The question to be answered.
step - The current simulation step.
Returns:
an AnswerIF that contains the appropriate data. (@link AnswerIF)

(c) by Micropsi Project: http://www.cognitive-agents.org

.