Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7209 in orxonox.OLD for branches/std


Ignore:
Timestamp:
Mar 10, 2006, 2:20:08 AM (19 years ago)
Author:
bensch
Message:

orxonox/std: even less evil

Location:
branches/std/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/std/src/lib/gui/gl_gui/glmenu/glmenu_imagescreen.cc

    r7208 r7209  
    1313   ### File Specific:
    1414   main-programmer: Patrick Boenzli
    15    co-programmer:
     15   co-programmer: Benjamin GRauer
    1616*/
    1717
     
    8484
    8585/**
    86   * sets the background image name
     86  * @brief sets the background image name
    8787  * @param backImageName name of the backgroun-image
    8888 */
     
    9393
    9494/**
    95  * sets position of the ImageScreen
     95 * @brief sets position of the ImageScreen
    9696 * @param offsetX offset from the top left corner in percent(0-1) of the screensize
    9797 * @param offsetY offset from the top left corner in percent(0-1) of the screensize
     
    104104
    105105/**
    106   \brief sets size of the ImageScreen
     106 * @brief sets size of the ImageScreen
    107107 * @param scaleX the scaleing of the image into the x-direction (in percent (0-1))
    108108 * @param scaleY the scaleing of the image into the y-direction (in percent (0-1))
     
    115115
    116116/**
    117   \brief sets position and size of the ImageScreen
    118 * @param offsetX offset from the top left corner in percent(0-1) of the screensize
    119 * @param offsetY offset from the top left corner in percent(0-1) of the screensize
    120 * @param scaleX the scaleing of the image into the x-direction (in percent (0-1))
    121 * @param scaleY the scaleing of the image into the y-direction (in percent (0-1))
     117 * @brief sets position and size of the ImageScreen
     118 * @param offsetX offset from the top left corner in percent(0-1) of the screensize
     119 * @param offsetY offset from the top left corner in percent(0-1) of the screensize
     120 * @param scaleX the scaleing of the image into the x-direction (in percent (0-1))
     121 * @param scaleY the scaleing of the image into the y-direction (in percent (0-1))
    122122*/
    123123void GLMenuImageScreen::setPosScale(float offsetX, float offsetY, float scaleX, float scaleY)
     
    136136
    137137/**
    138  * sets the Position and the Size of the bar
     138 * @brief sets the Position and the Size of the bar
    139139 * @param barX The Position in the x-direction in percent of the screen (0-1)
    140140 * @param barY The Position in the y-direction in percent of the screen (0-1)
     
    152152
    153153/**
    154  * set the maximum of countable steps
     154 * @brief set the maximum of countable steps
    155155 * @param maxValue of steps
    156156*/
     
    161161
    162162/**
    163  * set current value
     163 * @brief set current value
    164164 * @param currentValue value to set
    165165*/
     
    172172
    173173/**
    174  * get the current value
     174 * @brief get the current value
    175175 */
    176176int GLMenuImageScreen::getValue()
     
    181181
    182182/**
    183   * call this to trigger a progress event
    184 
    185    this has to redraw the progress bar and the whole image
     183 * @brief call this to trigger a progress event
     184 *
     185 * this has to redraw the progress bar and the whole image
    186186 */
    187187void GLMenuImageScreen::step ()
     
    199199
    200200/**
    201  * draws the ImageScreen to the screenbuffer
     201 * @brief draws the ImageScreen to the screenbuffer
    202202*/
    203203void GLMenuImageScreen::draw ()
  • branches/std/src/lib/util/loading/factory.cc

    r7193 r7209  
    2323//SHELL_COMMAND(create, Factory, fabricate);
    2424
    25 
    26 /*  --------------------------------------------------
    27  *               Factory
    28  *   --------------------------------------------------
     25/**
     26 * @brief constructor
     27 *
     28 * set everything to zero and define factoryName
    2929 */
    30 
    31 /**
    32  *  constructor
    33 
    34    set everything to zero and define factoryName
    35 */
    36 Factory::Factory (const char* factoryName, ClassID classID)
     30Factory::Factory (const std::string& factoryName, ClassID classID)
     31  : className(factoryName), classID(classID)
    3732{
    3833  this->setClassID(CL_FACTORY, "Factory");
    3934  this->setName(factoryName);
    40 
    41   this->classID = classID;
    42   this->className = factoryName;
    4335
    4436  if( Factory::factoryList == NULL)
     
    4840}
    4941
    50 /** a reference to the First Factory */
     42/** @brief a reference to the First Factory */
    5143std::list<Factory*>* Factory::factoryList = NULL;
    5244
    5345/**
    54  *  destructor
    55  *
    56  * clear the Q
     46 * @brief destructor
    5747 */
    5848Factory::~Factory ()
     
    6454
    6555/**
    66  * deletes all the Factories. (cleanup)
     56 * @brief deletes all the Factories. (cleanup)
    6757 */
    6858void Factory::deleteFactories()
     
    9080
    9181/**
    92  * Compares the Factories Name against a given ClassName
     82 * @brief Compares the Factories Name against a given ClassName
    9383 * @param className the Name of the Class to Query
    9484 * @returns true on match, false otherwise.
     
    9686bool Factory::operator==(const char* className) const
    9787{
    98   return(className != NULL && !strcmp(className, this->className));
     88  return(className != NULL && this->className == className);
     89}
     90
     91/**
     92 * @brief Compares the Factories Name against a given ClassName
     93 * @param className the Name of the Class to Query
     94 * @returns true on match, false otherwise.
     95 */
     96bool Factory::operator==(const std::string& className) const
     97{
     98  return(this->className == className);
    9999}
    100100
    101101
    102102/**
    103  * Creates a new Object of type root->Value() (name)
     103 * @brief Creates a new Object of type root->Value() (name)
    104104 * @param root the XML-Root to match for the newly created Object
    105105 * @returns a new Object of Type root->Value() on match, NULL otherwise
     
    133133 * @returns a new Object of Type className on match, NULL otherwise
    134134 */
    135  BaseObject* Factory::fabricate(const char* className)
     135 BaseObject* Factory::fabricate(const std::string& className)
    136136{
    137   if (className == NULL || Factory::factoryList == NULL)
     137  if (Factory::factoryList == NULL)
    138138    return NULL;
    139139
  • branches/std/src/lib/util/loading/factory.h

    r7167 r7209  
    4949  static void deleteFactories();
    5050
    51   static  BaseObject* fabricate(const char* className);
     51  static  BaseObject* fabricate(const std::string& className);
    5252  static  BaseObject* fabricate(ClassID classID);
    5353  static  BaseObject* fabricate(const TiXmlElement* root = NULL);
     
    5656  bool operator==(ClassID classID) const;
    5757  bool operator==(const char* className) const;
     58  bool operator==(const std::string& className) const;
    5859
    5960  protected:
    60     Factory (const char* factoryName, ClassID classID);
     61    Factory (const std::string& factoryName, ClassID classID);
    6162    virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const = 0;
    6263
    6364  protected:
    64     ClassID                       classID;              //!< The Class-Identifyer of the Factory.
    65     const char*                   className;            //!< The name of the Class.
     65    const ClassID                 classID;              //!< The Class-Identifyer of the Factory.
     66    const std::string             className;            //!< The name of the Class.
    6667    static std::list<Factory*>*   factoryList;          //!< List of Registered Factories
    6768};
  • branches/std/src/lib/util/loading/load_param.cc

    r7206 r7209  
    5959  if (likely(this->executor != NULL))
    6060  {
    61     std::string loadString;
     61    std::string loadString = "";
    6262    if (this->loadElem != NULL &&  this->loadElem->ToText())
    6363      loadString = this->loadElem->Value();
     
    6666          ((this->executor->getType() & Executor_NoLoadString) == Executor_NoLoadString)))
    6767    {
    68       PRINTF(4)("Loading '%s' with Parameters '%s' onto: '%s'(%s)\n", this->paramName, loadString, this->object->getName(), this->object->getClassName());
     68      PRINTF(4)("Loading '%s' with Parameters '%s' onto: '%s'(%s)\n", this->paramName, loadString.c_str(), this->object->getName(), this->object->getClassName());
    6969      this->executor->execute(this->object, &loadString);
    7070    }
  • branches/std/src/world_entities/power_ups/weapon_power_up.cc

    r7193 r7209  
    9292}
    9393
    94 void WeaponPowerUp::setWeaponClass(const char* name)
     94void WeaponPowerUp::setWeaponClass(const std::string& name)
    9595{
    9696  this->weapon = dynamic_cast<Weapon*>(Factory::fabricate(name));
    9797  if (this->weapon == NULL)
    9898  {
    99     PRINTF(1)("Unable to load Weapon. %s\n", name);
     99    PRINTF(1)("Unable to load Weapon. %s\n", name.c_str());
    100100    this->weapon = dynamic_cast<Weapon*>(Factory::fabricate("Turret"));
    101101  }
  • branches/std/src/world_entities/power_ups/weapon_power_up.h

    r7065 r7209  
    2222
    2323  Weapon* getWeapon();
    24   void setWeaponClass(const char* name);
     24  void setWeaponClass(const std::string& name);
    2525
    2626  virtual int writeBytes(const byte* data, int length, int sender);
Note: See TracChangeset for help on using the changeset viewer.