Changeset 19 for nrEngine/src


Ignore:
Timestamp:
01/10/07 21:29:46 (14 years ago)
Author:
art
Message:
 
Location:
nrEngine/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • nrEngine/src/EventActor.cpp

    r15 r19  
    2020 
    2121namespace nrEngine{ 
    22                  
     22 
     23        //------------------------------------------------------------------------ 
     24        EventActor::EventActor() 
     25        { 
     26         
     27        } 
     28 
    2329        //------------------------------------------------------------------------ 
    2430        EventActor::EventActor(const std::string& name) : mName(name){ 
     
    3642        } 
    3743 
     44        //------------------------------------------------------------------------ 
     45        void EventActor::setName(const std::string& name) 
     46        { 
     47                mName = name; 
     48        } 
     49         
     50         
    3851        //------------------------------------------------------------------------ 
    3952        const std::string& EventActor::getName() const 
  • nrEngine/src/EventChannel.cpp

    r1 r19  
    3434        Result EventChannel::add(EventActor* actor, bool notice) 
    3535        { 
     36                // check if actor has got a name  
     37                if (actor == NULL) return OK; 
     38                if (actor->getName().length() == 0) 
     39                { 
     40                        NR_Log(Log::LOG_ENGINE, Log::LL_ERROR, "EventChannel (%s): Want to connect nameless actor", getName().c_str()); 
     41                        return EVENT_NO_VALID_ACTOR; 
     42                } 
     43                 
    3644                // we first check whenever the actor is already connected 
    3745                if (isConnected(actor->getName())) return EVENT_ALREADY_CONNECTED; 
     
    5260        Result EventChannel::del(EventActor* actor, bool notice) 
    5361        { 
     62                if (actor == NULL) return OK; 
     63                 
    5464                // we first check whenever the actor is already connected 
    5565                if (!isConnected(actor->getName())) return EVENT_NOT_CONNECTED; 
Note: See TracChangeset for help on using the changeset viewer.