Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

netcontrol_c.cpp

Go to the documentation of this file.
00001 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
00002    this file is part of rcssserver3D
00003    Fri May 9 2003
00004    Copyright (C) 2003 Koblenz University
00005    $Id: netcontrol_c.cpp,v 1.1 2004/04/25 16:46:03 rollmark Exp $
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; version 2 of the License.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the Free Software
00018    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 */
00020 #include "netcontrol.h"
00021 
00022 using namespace oxygen;
00023 using namespace std;
00024 
00025 FUNCTION(NetControl, setServerTypeTCP)
00026 {
00027     obj->SetServerType(NetControl::ST_TCP);
00028     return true;
00029 }
00030 
00031 FUNCTION(NetControl, setServerTypeUDP)
00032 {
00033     obj->SetServerType(NetControl::ST_UDP);
00034     return true;
00035 }
00036 
00037 FUNCTION(NetControl, setServerPort)
00038 {
00039     unsigned int inPort;
00040 
00041     if (
00042         (in.GetSize() != 1) ||
00043         (! in.GetValue(in.begin(), inPort))
00044         )
00045         {
00046             return false;
00047         }
00048 
00049     obj->SetServerPort(inPort);
00050     return true;
00051 }
00052 
00053 FUNCTION(NetControl, getServerPort)
00054 {
00055     return obj->GetServerPort();
00056 }
00057 
00058 void CLASS(NetControl)::DefineClass()
00059 {
00060     DEFINE_BASECLASS(oxygen/SimControlNode);
00061     DEFINE_FUNCTION(setServerTypeTCP);
00062     DEFINE_FUNCTION(setServerTypeUDP);
00063     DEFINE_FUNCTION(setServerPort);
00064     DEFINE_FUNCTION(getServerPort);
00065 }

Generated on Thu Apr 6 15:25:39 2006 for rcssserver3d by  doxygen 1.4.4