Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 31, 2010, 8:56:01 PM (14 years ago)
Author:
landauf
Message:

XML code has to be enclosed in @code and @endcode tags or Doxygen will complain

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/doc/src/libraries/core/XMLPort.h

    r7297 r7298  
    6969
    7070    In the XML file, a param or attribute will be set like this:
     71    @code
    7172    <classname paramname="value" />
     73    @endcode
    7274
    7375    The macro will then call loadfunction(value) to set the given value (or call savefunction() to
     
    8890
    8991    In the XML file, a param or attribute will be set like this:
     92    @code
    9093    <classname paramname="value" />
     94    @endcode
    9195
    9296    The macro will then store "value" in the variable or read it when saving.
     
    212216    likely the best option, so this is usually true.
    213217
    214     @note
     218    @details
    215219    The load- and savefunctions have to follow an exactly defined protocol.
    216220    Loadfunction:
    217221      The loadfunction gets a pointer to the object.
    218       > void loadfunction(objectclass* pointer);
     222      @code
     223      void loadfunction(objectclass* pointer);
     224      @endcode
    219225
    220226    Savefunction:
     
    222228      gets called again, but with index + 1. It's the functions responsibility to do something smart
    223229      with the index and to return 0 if all objects were returned.
    224       > objectclass* savefunction(unsigned int index) const;
     230      @code
     231      objectclass* savefunction(unsigned int index) const;
     232      @endcode
    225233
    226234      Possible implementation:
     235      @code
    227236        objectclass* savefunction(unsigned int index) const
    228237        {
     
    232241            return 0;
    233242        }
     243      @endcode
    234244
    235245    Example:
    236246    Possible usage of the macro:
    237     > XMLPortObject(SpaceShip, Weapon, "weapons", addWeapon, getWeapon, xmlelement, mode, false, true);
     247    @code
     248    XMLPortObject(SpaceShip, Weapon, "weapons", addWeapon, getWeapon, xmlelement, mode, false, true);
     249    @endcode
    238250
    239251    Now you can add weapons through the XML file:
     252    @code
    240253    <SpaceShip someattribute="..." ...>
    241254      <weapons>
     
    245258      </weapons>
    246259    </SpaceShip>
     260    @endcode
    247261
    248262    Note that "weapons" is the subsection. This allows you to add more types of sub-objects. In our example,
Note: See TracChangeset for help on using the changeset viewer.