Now you can download a copy of these docs so you can use them offline! Download now
IntegerEntry.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 "NetworkTables/IntegerEntry.h" 00008 #include "NetworkTables/Buffer.h" 00009 00010 namespace NetworkTables 00011 { 00012 00013 IntegerEntry::IntegerEntry(int value) : 00014 m_value(value) 00015 { 00016 } 00017 00018 NetworkTables_Types IntegerEntry::GetType() 00019 { 00020 return kNetworkTables_Types_INT; 00021 } 00022 00023 void IntegerEntry::Encode(Buffer *buffer) 00024 { 00025 Entry::Encode(buffer); 00026 buffer->WriteByte(kNetworkTables_INT); 00027 buffer->WriteInt(m_value); 00028 } 00029 00030 int IntegerEntry::GetInt() 00031 { 00032 return m_value; 00033 } 00034 00035 } // namespace
Generated on Thu Jan 12 2012 22:35:20 for WPILibC++ by
1.7.1