/[adonthell]/adonthell/src/rpg/quest_event.h
ViewVC logotype

Diff of /adonthell/src/rpg/quest_event.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by ksterker, Sun Aug 14 16:52:55 2005 UTC revision 1.2 by ksterker, Sun Oct 9 07:38:40 2005 UTC
# Line 31  Line 31 
31    
32  #include <vector>  #include <vector>
33  #include "event/event.h"  #include "event/event.h"
34    #include "rpg/quest.h"
35    
36  namespace rpg  namespace rpg
37  {  {
# Line 74  namespace rpg Line 75  namespace rpg
75                   *                   *
76                   *      '*' will match one level in the path to the quest node, while '>'                   *      '*' will match one level in the path to the quest node, while '>'
77                   *      will match all nodes with a common prefix.                   *      will match all nodes with a common prefix.
78                     * @param part @quest part that just changed its state.
79                   */                   */
80          quest_event (const string & pattern);          quest_event (const string & pattern, quest_part * part = NULL);
81                                    
82  #ifndef SWIG  #ifndef SWIG
83                  /**                  /**
# Line 90  namespace rpg Line 92  namespace rpg
92           */           */
93          //@{          //@{
94          /**          /**
95           * Compare two time events for equality.           * Compare two %quest events for equality.
96           *           *
97           * @param e The time event to compare this to.           * @param e The %quest %event to compare this to.
98           * @return <b>True</b> if the two events equal, <b>false</b> otherwise.           * @return <b>True</b> if the two events equal, <b>false</b> otherwise.
99           */           */
100          bool equals (const events::event * e);          bool equals (const events::event * e);
101    
102                    /**
103                     * Return %quest part that triggered this event.
104                     * @return %quest part that triggered this event.
105                     */
106                    quest_part *part ()
107                    {
108                            return Part;
109                    }
110                    
111  #ifndef SWIG  #ifndef SWIG
112          /**          /**
113           * Get name of %event.           * Get name of %event.
# Line 168  namespace rpg Line 179  namespace rpg
179  #endif  #endif
180    
181      private:      private:
182                    /**
183                     * Set the pattern for the triggering events.
184                     * @param pattern path of quest that will trigger events. It may
185                     *  contain the wildcards '*' and '>'.
186                     */
187                    void quest_event::set_pattern (const std::string & pattern);
188            
189          /// pattern that will trigger event          /// pattern that will trigger event
190          std::vector<std::string> Pattern;          std::vector<std::string> Pattern;
191                    /// %quest part that triggered the event
192                    quest_part *Part;
193      };      };
194  }  }
195    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26