Now you can download a copy of these docs so you can use them offline! Download now
PrintCommand.cpp
00001 /*----------------------------------------------------------------------------*/ 00002 /* Copyright (c) FIRST 2011. All Rights Reserved. */ 00003 /* Open Source Software - may be modified and shared by FRC teams. The code */ 00004 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */ 00005 /*----------------------------------------------------------------------------*/ 00006 00007 #include "Commands/PrintCommand.h" 00008 #include "stdio.h" 00009 #include <sstream> 00010 00011 PrintCommand::PrintCommand(const char *message) : 00012 Command(((std::stringstream&)(std::stringstream("Print \"") << message << "\"")).str().c_str()) 00013 { 00014 m_message = message; 00015 } 00016 00017 void PrintCommand::Initialize() 00018 { 00019 printf(m_message.c_str()); 00020 } 00021 00022 void PrintCommand::Execute() 00023 { 00024 } 00025 00026 bool PrintCommand::IsFinished() 00027 { 00028 return true; 00029 } 00030 00031 void PrintCommand::End() 00032 { 00033 } 00034 00035 void PrintCommand::Interrupted() 00036 { 00037 }
Generated on Thu Jan 12 2012 22:35:23 for WPILibC++ by
1.7.1