Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 21, 2009, 1:18:36 PM (15 years ago)
Author:
rgrieder
Message:

Found some non empty new lines.

Location:
code/branches/presentation2/src/libraries/core
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/BaseObject.cc

    r5929 r6387  
    119119        XMLPortObjectTemplate(BaseObject, Template, "templates", addTemplate, getTemplate, xmlelement, mode, Template*);
    120120        XMLPortObject(BaseObject, BaseObject, "eventlisteners", addEventListener, getEventListener, xmlelement, mode);
    121        
     121
    122122        Element* events = 0;
    123123        if (mode == XMLPort::LoadObject || mode == XMLPort::ExpandObject)
     
    139139        XMLPortEventState(BaseObject, BaseObject, "visibility", setVisible, xmlelement, mode);
    140140        XMLPortEventState(BaseObject, BaseObject, "mainstate", setMainState, xmlelement, mode);
    141        
     141
    142142        this->bRegisteredEventStates_ = true;
    143143    }
     
    236236            if (it->second != state)
    237237                continue;
    238            
     238
    239239            if (i == index)
    240240                return it->first;
     
    252252        listener->addEventSource(this, "mainstate");
    253253    }
    254    
     254
    255255    /**
    256256        @brief Returns an event listener with a given index.
     
    344344    {
    345345        this->registerEventStates();
    346        
     346
    347347        std::map<std::string, EventState*>::const_iterator it = this->eventStates_.find(event.statename_);
    348348        if (it != this->eventStates_.end())
     
    356356    /**
    357357        @brief Sets the main state of the object to a given boolean value.
    358        
     358
    359359        Note: The main state of an object can be set with the @ref setMainStateName function.
    360360        It's part of the eventsystem and used for event forwarding (when the target object can't specify a specific state,
     
    389389        {
    390390            this->registerEventStates();
    391            
     391
    392392            std::map<std::string, EventState*>::const_iterator it = this->eventStates_.find(this->mainStateName_);
    393393            if (it != this->eventStates_.end() && it->second->getFunctor())
     
    402402        }
    403403    }
    404    
     404
    405405    /**
    406406        @brief Calls XMLEventPort with an empty XML-element to register the event states if necessary.
     
    414414        }
    415415    }
    416    
     416
    417417    /**
    418418        @brief Manually loads all event states, even if the class doesn't officially support them. This is needed by some classes like @ref EventDispatcher or @ref EventTarget.
  • code/branches/presentation2/src/libraries/core/BaseObject.h

    r5929 r6387  
    157157            void removeEventSource(BaseObject* source);
    158158            BaseObject* getEventSource(unsigned int index, const std::string& state) const;
    159            
     159
    160160            void addEventListener(BaseObject* listener);
    161161            BaseObject* getEventListener(unsigned int index) const;
     
    172172            /** @brief Returns the indentation of the debug output in the Loader. @return The indentation */
    173173            inline const std::string& getLoaderIndentation() const { return this->loaderIndentation_; }
    174            
     174
    175175            static void loadAllEventStates(Element& xmlelement, XMLPort::Mode mode, BaseObject* object, Identifier* identifier);
    176176
     
    210210            Gametype*              oldGametype_;
    211211            std::set<Template*>    templates_;
    212            
     212
    213213            std::map<BaseObject*, std::string>  eventSources_;           //!< List of objects which send events to this object, mapped to the state which they affect
    214214            std::set<BaseObject*>               eventListeners_;         //!< List of objects which listen to the events of this object
  • code/branches/presentation2/src/libraries/core/ConfigFileManager.cc

    r6197 r6387  
    5757        return false;
    5858    }
    59    
     59
    6060    std::string getConfig(const std::string& classname, const std::string& varname)
    6161    {
  • code/branches/presentation2/src/libraries/core/Event.cc

    r5929 r6387  
    4545    /**
    4646        @brief Processes an event (calls the set-function if the necessary conditions are met).
    47        
     47
    4848        @param event     The fired event
    4949        @param object    The object whose state is affected by the event (only needed for debug output)
  • code/branches/presentation2/src/libraries/core/Event.h

    r5929 r6387  
    5050    /**
    5151        @brief The EventState contains information about an event state.
    52        
     52
    5353        An event state is a state of an object, which can be changed by events.
    5454        Event states are changed through functions. Possible functions headers for set event states are:
     
    5656         - boolean state:    function(bool state)
    5757         - individual state: function(bool state, SomeClass originator)
    58          
     58
    5959        Note that SomeClass may be any class deriving from BaseObject. You will not receive events from originators of other classes.
    6060        The actual class for SomeClass must be specified as the second argument of the XMLPortEventState macro.
    61        
     61
    6262        The this pointer of the affected object is hidden in the functors, because the events are processed in the BaseObject, but some
    6363        statefunctions may be from child-classes.
     
    7070
    7171            void process(const Event& event, BaseObject* object);
    72            
     72
    7373            Functor* getFunctor() const
    7474                { return this->statefunction_; }
  • code/branches/presentation2/src/libraries/core/EventIncludes.h

    r5929 r6387  
    3636/**
    3737    @brief Defines a new event state (a state of the object which can be changed by events).
    38    
     38
    3939    @param classname    The name of this class
    4040    @param subclassname Usually BaseObject - if different, only instances of this class can send events to this object
     
    6969    static orxonox::ExecutorMember<classname>* xmlgetfunctor##name = (orxonox::ExecutorMember<classname>*)&orxonox::createExecutor(orxonox::createFunctor(&classname::getEventSource), std::string( #classname ) + "::" + "getEventSource" + "(" + statename + ")")->setDefaultValue(1, statename); \
    7070    XMLPortObjectGeneric(xmlport##name, classname, orxonox::BaseObject, statename, xmlsetfunctor##name, xmlgetfunctor##name, xmlelement, mode, false, true)
    71    
     71
    7272
    7373/**
    7474    @brief Defines a new event name for a class. Named events can only have names which were defined with this macro.
    75    
     75
    7676    @param classname The name of the class
    7777    @param name      The name of the event
     
    8585#define FireEventName(classname, name) \
    8686    eventname##classname##name
    87  
     87
    8888#endif /* _EventIncludes_H__ */
  • code/branches/presentation2/src/libraries/core/GUIManager.cc

    r6367 r6387  
    6666        { GUIManager::getInstance().keyESC(); }
    6767    SetConsoleCommandShortcutExternAlias(key_esc, "keyESC");
    68    
     68
    6969    class CEGUILogger : public CEGUI::DefaultLogger
    7070    {
     
    246246        this->executeCode("keyESC()");
    247247    }
    248    
     248
    249249    void GUIManager::setBackground(const std::string& name)
    250250    {
  • code/branches/presentation2/src/libraries/core/OrxonoxClass.h

    r6348 r6387  
    149149                    this->destroy();
    150150            }
    151                
     151
    152152            /** @brief Register a weak pointer which points to this object. */
    153153            template <class T>
  • code/branches/presentation2/src/libraries/core/SmartPtr.h

    r5929 r6387  
    8484                    this->base_->decrementReferenceCount();
    8585            }
    86            
     86
    8787            inline const SmartPtr& operator=(int)
    8888            {
  • code/branches/presentation2/src/libraries/core/Thread.cc

    r5738 r6387  
    4141{
    4242    boost::posix_time::millisec THREAD_WAIT_BEFORE_DETACH(1000);
    43    
    44    
     43
     44
    4545    Thread::Thread():
    4646        executor_(0),
     
    5353        this->workerThread_ = new boost::thread( boost::bind(&Thread::threadLoop, this) );
    5454    }
    55    
     55
    5656    Thread::~Thread()
    5757    {
     
    6666        delete this->isWorkingMutex_;
    6767    }
    68    
     68
    6969    bool Thread::isWorking()
    7070    {
     
    7474      return isWorking;
    7575    }
    76    
     76
    7777    bool Thread::evaluateExecutor( Executor* executor )
    7878    {
     
    8585        return true;
    8686    }
    87    
     87
    8888    void Thread::threadLoop()
    8989    {
     
    114114        }
    115115    }
    116    
     116
    117117    void Thread::waitUntilFinished()
    118118    {
  • code/branches/presentation2/src/libraries/core/Thread.h

    r5738 r6387  
    5050    private:
    5151        void            threadLoop();
    52        
     52
    5353        Executor*       executor_;
    5454        bool            isWorking_;
  • code/branches/presentation2/src/libraries/core/ThreadPool.cc

    r5738 r6387  
    3737    {
    3838    }
    39    
     39
    4040    ThreadPool::~ThreadPool()
    4141    {
     
    4343        assert(a == 0);
    4444    }
    45    
     45
    4646    void ThreadPool::addThreads( unsigned int nr )
    4747    {
     
    8080        }
    8181    }
    82    
     82
    8383    bool ThreadPool::passFunction( Executor* executor, bool addThread )
    8484    {
     
    103103            return false;
    104104    }
    105    
     105
    106106    void ThreadPool::synchronise()
    107107    {
  • code/branches/presentation2/src/libraries/core/ThreadPool.h

    r5738 r6387  
    4141        ThreadPool();
    4242        virtual ~ThreadPool();
    43        
     43
    4444        void addThreads( unsigned int nr );
    4545        unsigned int removeThreads( unsigned int nr );
    4646        unsigned int setNrOfThreads( unsigned int nr );
    47        
     47
    4848        bool passFunction( Executor* executor, bool addThread=false );
    4949        void synchronise();
    50        
     50
    5151    private:
    5252        std::vector<Thread*> threadPool_;
    53        
     53
    5454    };
    5555}
  • code/branches/presentation2/src/libraries/core/WeakPtr.h

    r5929 r6387  
    4444    {
    4545        friend class OrxonoxClass;
    46        
     46
    4747        public:
    4848            inline WeakPtr() : pointer_(0), base_(0), callback_(0)
     
    7979                if (this->callback_)
    8080                    delete this->callback_;
    81                    
    82             }
    83            
     81
     82            }
     83
    8484            inline const WeakPtr& operator=(int)
    8585            {
     
    145145                if (other.base_)
    146146                    other.base_->unregisterWeakPtr(&other);
    147                
     147
    148148                {
    149149                    T* temp = this->pointer_;
     
    167167                WeakPtr().swap(*this);
    168168            }
    169            
     169
    170170            inline void setCallback(Functor* callback)
    171171            {
    172172                this->callback_ = callback;
    173173            }
    174            
     174
    175175            inline Functor* getFunctor() const
    176176            {
     
    186186                    (*this->callback_)();
    187187            }
    188        
     188
    189189            T* pointer_;
    190190            OrxonoxClass* base_;
  • code/branches/presentation2/src/libraries/core/input/InputManager.h

    r6278 r6387  
    8383        @brief
    8484            Loads the devices and initialises the KeyDetector and the Calibrator.
    85            
     85
    8686            If either the OIS input system and/or the keyboard could not be created,
    8787            the constructor fails with an std::exception.
     
    170170        OIS::InputManager* getOISInputManager() { return this->oisInputManager_; }
    171171        std::pair<int, int> getMousePosition() const;
    172        
     172
    173173        static InputManager& getInstance() { return Singleton<InputManager>::getInstance(); } // tolua_export
    174174
  • code/branches/presentation2/src/libraries/core/input/InputPrereqs.h

    r5781 r6387  
    202202            MediaSelect   = OIS::KC_MEDIASELECT      // Media Select
    203203        };
    204        
     204
    205205        //! Key codes as strings
    206206        const char* const ByString[] =
  • code/branches/presentation2/src/libraries/core/input/InputState.cc

    r5929 r6387  
    102102        if (enterFunctor_)
    103103            (*enterFunctor_)();
    104            
     104
    105105    }
    106106
  • code/branches/presentation2/src/libraries/core/input/KeyBinder.cc

    r6360 r6387  
    283283        }
    284284    }
    285    
     285
    286286     void KeyBinder::addButtonToCommand(std::string command, Button* button)
    287287     { 
    288288        std::ostringstream stream;
    289289        stream << button->groupName_  << "." << button->name_;
    290        
     290
    291291        std::vector<std::string>& oldKeynames = this->allCommands_[button->bindingString_];
    292292        std::vector<std::string>::iterator it = std::find(oldKeynames.begin(), oldKeynames.end(), stream.str());
     
    295295            oldKeynames.erase(it);
    296296        }
    297        
     297
    298298        if(command != "")
    299299        {
     
    305305        }
    306306     }
    307    
     307
    308308    /**
    309309    @brief
     
    317317            return keynames.front();
    318318        }
    319        
     319
    320320        return "";
    321321    }
    322    
     322
    323323    /**
    324324    @brief
     
    338338                return keynames[index];
    339339            }
    340                
     340
    341341            return "";
    342342        }
    343        
     343
    344344        return "";
    345345    }
    346    
     346
    347347    /**
    348348    @brief
     
    358358            return keynames.size();
    359359        }
    360        
     360
    361361        return 0;
    362362    }
  • code/branches/presentation2/src/libraries/core/input/KeyBinder.h

    r6311 r6387  
    6969        std::string getBinding(std::string commandName, unsigned int index); //tolua_export
    7070        unsigned int getNumberOfBindings(std::string commandName); //tolua_export
    71        
     71
    7272        const std::string& getBindingsFilename()
    7373            { return this->filename_; }
     
    161161    private:
    162162        void addButtonToCommand(std::string command, Button* button);
    163        
     163
    164164        //##### ConfigValues #####
    165165        //! Whether to filter small value analog input
  • code/branches/presentation2/src/libraries/core/input/KeyBinderManager.cc

    r6367 r6387  
    9292            this->bDefaultFileLoaded_ = false;
    9393    }
    94    
     94
    9595    inline void KeyBinderManager::unbind(const std::string& binding)
    9696    {
    9797        this->currentBinder_->setBinding("", binding, false);
    9898    }
    99            
     99
    100100    inline void KeyBinderManager::tunbind(const std::string& binding)
    101101    {
Note: See TracChangeset for help on using the changeset viewer.