Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5466 in orxonox.OLD


Ignore:
Timestamp:
Nov 3, 2005, 12:34:05 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: some changes from class to typename in Templates

Location:
trunk/src/lib/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/array.h

    r5390 r5466  
    1515
    1616/*!
    17   @file array.h
    18   @brief Contains the tArray Class that handles arrays of classes.
    19   this class creates a Array of a semi-Dynamic length.
    20   beware, that after finalizing the array may not be resized again.
    21 */
     17 * @file array.h
     18 * @brief Contains the tArray Class that handles arrays of classes.
     19 * this class creates a Array of a semi-Dynamic length.
     20 * beware, that after finalizing the array may not be resized again.
     21 *
     22 * This array is very performant and usefull, if you need a Dynamic Array,
     23 * that you fill once, and then only read the pushed in values to it again.
     24 */
    2225
    2326#ifndef _ARRAY_H
  • trunk/src/lib/util/t_stack.h

    r5388 r5466  
    2727
    2828//! Stack Class that handles dynamic-type Stacks.
    29 template<class T>
    30      class tStack
     29template<typename T>
     30    class tStack
    3131{
    3232  public:
     
    3939    /** @returns the Size of the Stack (0 if empty) */
    4040    unsigned int getSize() { return this->entryCount; };
     41
     42    // stack copying.
     43    // tStack<T>& operator= (const tStack<T>& stack);
    4144
    4245    void debug() const ;
     
    5255
    5356    unsigned int     entryCount;      //!< The count of Entries in this Array.
    54     tStackEntry*     topEntry;      //!< Pointer to the first Entry of this Array
     57    tStackEntry*     topEntry;        //!< Pointer to the first Entry of this Array
    5558};
    5659
     
    5861 * creates and initializes a Stack
    5962 */
    60 template<class T>
     63template<typename T>
    6164    tStack<T>::tStack()
    6265{
     
    6972 * This does not delete the entries of the Stack
    7073 */
    71 template<class T>
     74template<typename T>
    7275    tStack<T>::~tStack()
    7376{
     
    8689 * @param entry the Entry to push into the Stack
    8790 */
    88 template<class T>
     91template<typename T>
    8992    void tStack<T>::push(T entry)
    9093{
     
    102105 * @returns the top-most enrty.
    103106 */
    104 template<class T>
     107template<typename T>
    105108    T tStack<T>::pop()
    106109{
     
    117120
    118121/**
    119  * @returns the topMost entry of the Stack
     122 * @returns the topMost entry of the Stack without removing it.
    120123 */
    121 template<class T>
     124template<typename T>
    122125    T tStack<T>::getTop()
    123126{
Note: See TracChangeset for help on using the changeset viewer.