Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

P_Buttons.C

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2019 The Board of Trustees of the           
00004  *cr                        University of Illinois                       
00005  *cr                         All Rights Reserved                        
00006  *cr                                                                   
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: P_Buttons.C,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.20 $       $Date: 2019/01/17 21:21:00 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  * This is Paul's new Tracker code -- pgrayson@ks.uiuc.edu
00019  *
00020  * A Buttons is a representation for a set of n boolean inputs.  This
00021  * fairly abstract class should be subclassed to make Buttons objects
00022  * that actually know how to get their buttons.  This is somewhat
00023  * parallel to the Tracker object, compare them!
00024  *
00025  ***************************************************************************/
00026 
00027 #include "P_Buttons.h"
00028 
00029 int Buttons::start(const SensorConfig *config) {
00030   const ResizeArray<int> *theused = config->getsensors();
00031   int i;
00032   for(i=0; i<MAX_BUTTONS; i++)
00033     stat[i]=0;
00034 
00035   used.clear();
00036   for(i=0; i<theused->num(); i++) {
00037     used.append((*theused)[i]);
00038   }
00039 
00040   return do_start(config);
00041 }

Generated on Tue Oct 15 02:44:56 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002