Changeset 6777 for code/branches/chat
- Timestamp:
- Apr 26, 2010, 2:48:12 PM (15 years ago)
- Location:
- code/branches/chat/src/orxonox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/chat/src/orxonox/ChatInputHandler.cc
r6776 r6777 31 31 namespace orxonox 32 32 { 33 /* singleton */ 34 ManageScopedSingleton( ChatInputHandler, ScopeID::Root, false ); 35 33 36 /* constructor */ 34 37 void ChatInputHandler::ChatInputHandler() 35 38 { 39 /* register the object */ 40 RegisterObject(ChatInputHandler); 41 36 42 /* create necessary objects */ 37 43 this->inpbuf = new InputBuffer(); … … 66 72 } 67 73 74 75 /* activate, deactivate */ 76 void ChatInputHandler::activate() /* TBI */ 77 { 78 /* start listening */ 79 } 80 81 void ChatInputHandler::deactivate() /* TBI */ 82 { 83 /* stop listening */ 84 } 85 86 87 68 88 /* callbacks for InputBuffer */ 69 89 void ChatInputHandler::inputChanged() … … 79 99 /* actually do send what was input */ 80 100 /* a) get the string out of the inputbuffer */ 101 String msgtosend = this->inpbuf->get(); 81 102 82 103 /* b) clear the input buffer */ 104 this->inpbuf->clear(); 83 105 84 106 /* c) send the chat via some call */ 107 Host::Chat( msgtosend ); 85 108 86 109 /* d) stop listening to input */ -
code/branches/chat/src/orxonox/ChatInputHandler.h
r6776 r6777 40 40 #include <OrxonoxPrereqs.h> 41 41 #include <InputBuffer.h> 42 #include <Host.h> 42 43 43 44 … … 45 46 { 46 47 /* class to handle chat using an InputBuffer */ 47 class _OrxonoxExport ChatInputHandler 48 class _OrxonoxExport ChatInputHandler : public Singleton<ChatInputHandler> 48 49 { 49 50 private: … … 59 60 /** constructor */ 60 61 ChatInputHandler(); 62 friend class Singleton<ChatInputHandler>; 63 64 /* start listening, stop listening */ 65 void activate(); 66 void deactivate(); 61 67 62 68 void inputChanged();
Note: See TracChangeset
for help on using the changeset viewer.