Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3230 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Dec 20, 2004, 12:41:55 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: unstable - list_template, keyname

Location:
orxonox/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/keynames.cc

    r2995 r3230  
    2020using namespace std;
    2121
    22 int buttonname_to_SDLB( char* name)
     22int buttonnameToSDLB( char* name)
    2323{
    2424        if( !strcmp (name, "BUTTON_LEFT")) return SDL_BUTTON_LEFT;
     
    3030}
    3131
    32 char* SDLB_to_buttonname( int button)
     32char* SDLBToButtonname( int button)
    3333{
    3434        if( button == SDL_BUTTON_LEFT) return "BUTTON_LEFT";
     
    4040}
    4141
    42 int keyname_to_SDLK( char* name)
     42int keynameToSDLK( char* name)
    4343{
    4444        if( !strcmp (name, "BACKSPACE")) return SDLK_BACKSPACE;
     
    178178}
    179179
    180 char* SDLK_to_keyname( int key)
     180char* SDLKToKeyname( int key)
    181181{
    182182        if( key == SDLK_BACKSPACE) return "BACKSPACE";
  • orxonox/trunk/src/keynames.h

    r3224 r3230  
    2424        \return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid
    2525*/
    26 int buttonname_to_SDLB( char* name);
     26int buttonnameToSDLB( char* name);
    2727
    2828/**
     
    3131        \return a pointer to a string containing the name of the mouse button
    3232*/
    33 char* SDLB_to_buttonname( int button);
     33char* SDLBToButtonname( int button);
    3434
    3535/**
     
    3838        \return the SDLK sym of the named key or -1 if the key name is not valid
    3939*/
    40 int keyname_to_SDLK( char* name);
     40int keynameToSDLK( char* name);
    4141
    4242/**
     
    4545        \return a pointer to a string containig the name of the key
    4646*/
    47 char* SDLK_to_keyname( int key);
     47char* SDLKToKeyname( int key);
    4848
    4949
  • orxonox/trunk/src/list_template.h

    r3224 r3230  
    4747 
    4848  int add(T* obj, ADDMODE mode, bool bRef);
    49   T* get_object();
    50   ListTemplate<T>* get_next();
    51   ListTemplate<T>* get_previous();
    52   ListTemplate<T>* get_last();
    53   ListTemplate<T>* get_first();
    54   void set_next(ListTemplate<T>* ptr);
    55   void set_prev(ListTemplate<T>* ptr);
     49  T* getObject();
     50  ListTemplate<T>* getNext();
     51  ListTemplate<T>* getPrevious();
     52  ListTemplate<T>* getLast();
     53  ListTemplate<T>* getFirst();
     54  void setNext(ListTemplate<T>* ptr);
     55  void setPrev(ListTemplate<T>* ptr);
    5656  int remove (T* obj, FINDMODE mode);
    5757  int getSize();
     
    101101  else
    102102  {
    103     if (prev != NULL) prev->set_next (next);
    104     if (next != NULL) next->set_prev (prev);
     103    if (prev != NULL) prev->setNext (next);
     104    if (next != NULL) next->setPrev (prev);
    105105    if (!bReference) delete object;
    106106  }
     
    131131    case LIST_ADD_NEXT:
    132132      p = new ListTemplate<T>( obj, next, this, bRef);
    133       if( next != NULL) next->set_prev (p);
     133      if( next != NULL) next->setPrev (p);
    134134      next = p;
    135135      break;
    136136    case LIST_ADD_PREV:
    137137      p = new ListTemplate<T>( obj, this, prev, bRef);
    138       if( prev != NULL) prev->set_next (p);
     138      if( prev != NULL) prev->setNext (p);
    139139      prev = p;
    140140      break;
     
    160160*/
    161161template<class T>
    162 ListTemplate<T>* ListTemplate<T>::get_next ()
     162ListTemplate<T>* ListTemplate<T>::getNext ()
    163163{
    164164  return next;
     
    170170*/
    171171template<class T>
    172 ListTemplate<T>* ListTemplate<T>::get_previous ()
     172ListTemplate<T>* ListTemplate<T>::getPrevious ()
    173173{
    174174  return prev;
     
    180180*/
    181181template<class T>
    182 ListTemplate<T>* ListTemplate<T>::get_last ()
     182ListTemplate<T>* ListTemplate<T>::getLast ()
    183183{
    184184  if (next == NULL) return this;
    185   else return next->get_last();
     185  else return next->getLast();
    186186}
    187187
     
    191191*/
    192192template<class T>
    193 ListTemplate<T>* ListTemplate<T>::get_first ()
     193ListTemplate<T>* ListTemplate<T>::getFirst ()
    194194{
    195195  if (prev == NULL) return this;
    196   else return prev->get_first();
     196  else return prev->getFirst();
    197197}
    198198
     
    221221        else
    222222        {
    223           if( prev->get_object() == obj)
     223          if( prev->getObject() == obj)
    224224          {
    225225            delete prev;
     
    235235        else
    236236        {
    237           if( next->get_object() == obj)
     237          if( next->getObject() == obj)
    238238          {
    239239            delete next;
     
    260260*/
    261261template<class T>
    262 void ListTemplate<T>::set_next (ListTemplate<T>* ptr)
     262void ListTemplate<T>::setNext (ListTemplate<T>* ptr)
    263263{
    264264  next = ptr;
     
    272272*/
    273273template<class T>
    274 void ListTemplate<T>::set_prev (ListTemplate<T>* ptr)
     274void ListTemplate<T>::setPrev (ListTemplate<T>* ptr)
    275275{
    276276  prev = ptr;
     
    282282*/
    283283template<class T>
    284 T* ListTemplate<T>::get_object()
     284T* ListTemplate<T>::getObject()
    285285{
    286286  return object;
Note: See TracChangeset for help on using the changeset viewer.