Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8226 in orxonox.OLD for branches/gui/src/lib/util


Ignore:
Timestamp:
Jun 8, 2006, 10:49:15 AM (19 years ago)
Author:
bensch
Message:

gui: doxy-tags

Location:
branches/gui/src/lib/util
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/util/directory.cc

    r8225 r8226  
    4848#include <iostream>
    4949
     50/**
     51 * @brief Constructs a Directory handler.
     52 * @param directoryName the name of the Directory to access.
     53 */
    5054Directory::Directory(const std::string& directoryName)
    5155    : File(directoryName)
     
    5458}
    5559
     60/**
     61 * @brief destructs the Directory.
     62 */
    5663Directory::~Directory()
    5764{
     
    6067
    6168
     69/**
     70 * @brief openes the Directory
     71 * @returns true on success, false on error. (does not exist, no rights -> test with functions of File)
     72 *
     73 * Fills the List of Files, and sets the Directory to open state
     74 */
    6275bool Directory::open()
    6376{
     
    117130}
    118131
     132/**
     133 * @brief closes the directory
     134 * @returns true.
     135 *
     136 * Clears the List of Files in the Directory.
     137 */
    119138bool Directory::close()
    120139{
     
    125144
    126145
    127 
     146/**
     147 * @brief creates the directory
     148 * @returns true on success, false on error
     149 */
    128150bool Directory::create()
    129151{
  • branches/gui/src/lib/util/directory.h

    r8224 r8226  
    4040  bool create();
    4141
     42  /** @returns if the Directory was opened */
     43  bool isOpen() const { return this->_opened; }
     44  /** @returns the FileCount (count of files contained in this directory) */
     45  unsigned int fileCount() const { return _fileNames.size(); };
    4246  /** @returns the FileNames contained inside of the Directory */
    4347  const std::vector<std::string>& fileNames() const { return this->_fileNames; };
     48  /** @returns the i'th FileName @param fileNumber the fileNumber (must not bigger than fileCount()) */
    4449  const std::string& operator[](unsigned int fileNumber) const { return this->_fileNames[fileNumber]; };
    45   unsigned int fileCount() const { return _fileNames.size(); };
    46 
     50  /** @returns a formated string containing the FileName, prepended with the directory-Name */
    4751  std::string fileNameInDir(unsigned int fileNumber) const { return this->name() + "/" + _fileNames[fileNumber]; };
    48 
     52  /** @returns a File pointing to the File @param fileNumber the fileNumber (must not bigger than fileCount()) */
    4953  File getFile(unsigned int fileNumber) const { return File(fileNameInDir(fileNumber)); };
    5054
    5155private:
    52   bool                        _opened;
    53   std::vector<std::string>    _fileNames;
     56  bool                        _opened;          //!< If the directory was opened.
     57  std::vector<std::string>    _fileNames;       //!< The List of Files contained in the directory. (will be filled when open was called.)
    5458};
    5559
  • branches/gui/src/lib/util/file.cc

    r7674 r8226  
    160160{
    161161#warning implement
     162  return false;
    162163}
    163164
     
    165166{
    166167#warning implement
     168  return false;
    167169}
    168170
Note: See TracChangeset for help on using the changeset viewer.