Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 16, 2008, 3:46:25 AM (17 years ago)
Author:
landauf
Message:

added comments to all my classes in util

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/util/Clipboard.cc

    r1505 r1791  
    2929 */
    3030
     31/**
     32    @file Clipboard.cc
     33    @brief OS-specific implementations of the clipboard functions.
     34*/
     35
    3136#include "Clipboard.h"
    3237
    3338#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
     39    /////////////
     40    // Windows //
     41    /////////////
    3442    #include <windows.h>
     43    #include "Debug.h"
    3544
    36     bool toClipboard(std::string text)
     45    /**
     46        @brief Puts text into the windows-clipboard
     47        @param text The text
     48        @return True if the action was successful
     49    */
     50    bool toClipboard(const std::string& text)
    3751    {
    3852        try
     
    5367        catch (...)
    5468        {
     69            COUT(1) << "Error: Unable to copy the following text to the clipboard:" << std::endl;
     70            COUT(1) << "       \"" << text << "\"" << std::endl;
    5571        }
    5672        return false;
    5773    }
    5874
     75    /**
     76        @brief Gets text from the windows-clipboard if there is any text.
     77        @return The retrieved text
     78    */
    5979    std::string fromClipboard()
    6080    {
     
    7393        catch (...)
    7494        {
     95            COUT(1) << "Error: Unable to retrieve text from the clipboard." << std::endl;
    7596        }
    7697        return "";
    7798    }
    7899#else
    79     std::string clipboard = "";
     100    /////////////
     101    // Default //
     102    /////////////
    80103
    81     bool toClipboard(std::string text)
     104    std::string clipboard = ""; //!< Keeps the text of our internal clipboard
     105
     106    /**
     107        @brief Default implementation if there is no OS-specific implementation or no clipboard. Copies the text into an internal clipboard.
     108        @param text The text
     109        @return True
     110    */
     111    bool toClipboard(const std::string& text)
    82112    {
    83113        clipboard = text;
     
    85115    }
    86116
     117    /**
     118        @brief Default implementation if there is no OS-specific implementation or no clipboard. Gets the text from the internal clipboard.
     119        @return The text
     120    */
    87121    std::string fromClipboard()
    88122    {
Note: See TracChangeset for help on using the changeset viewer.