Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 15, 2010, 3:27:09 PM (14 years ago)
Author:
dafrick
Message:

Merged pickup branch into trunk. Yay. Persisting bugs will be fixed, very soon.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/BaseObject.cc

    r6417 r6524  
    115115        XMLPortParam(BaseObject, "active", setActive, isActive, xmlelement, mode);
    116116        XMLPortParam(BaseObject, "mainstate", setMainStateName, getMainStateName, xmlelement, mode);
    117 
     117        XMLPortParamTemplate(BaseObject, "template", addTemplate, getSingleTemplate, xmlelement, mode, const std::string&);
     118       
    118119        XMLPortObjectTemplate(BaseObject, Template, "templates", addTemplate, getTemplate, xmlelement, mode, Template*);
    119120        XMLPortObject(BaseObject, BaseObject, "eventlisteners", addEventListener, getEventListener, xmlelement, mode);
     
    190191
    191192    /**
     193        @brief Returns the name of the first Template.
     194        @return The name as string.
     195    */
     196    const std::string& BaseObject::getSingleTemplate(void) const
     197    {
     198        if(this->templates_.empty())
     199            return BLANKSTRING;
     200
     201        return (*this->templates_.begin())->getName();
     202    }
     203
     204    /**
    192205        @brief Returns the Template with the given index.
    193206        @param index The index
Note: See TracChangeset for help on using the changeset viewer.