Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

idCameraEvent Class Reference

#include <splines.h>

Collaboration diagram for idCameraEvent:

Collaboration graph
[legend]

Public Types

enum  eventType {
  EVENT_NA = 0x00, EVENT_WAIT, EVENT_TARGETWAIT, EVENT_SPEED,
  EVENT_TARGET, EVENT_SNAPTARGET, EVENT_FOV, EVENT_SCRIPT,
  EVENT_TRIGGER, EVENT_STOP, EVENT_COUNT
}
enum  eventType {
  EVENT_NA = 0x00, EVENT_WAIT, EVENT_TARGETWAIT, EVENT_SPEED,
  EVENT_TARGET, EVENT_SNAPTARGET, EVENT_FOV, EVENT_SCRIPT,
  EVENT_TRIGGER, EVENT_STOP, EVENT_COUNT
}

Public Member Functions

const char * getParam ()
const char * getParam ()
long getTime ()
long getTime ()
bool getTriggered ()
bool getTriggered ()
eventType getType ()
eventType getType ()
 idCameraEvent (eventType t, const char *param, long n)
 idCameraEvent ()
 idCameraEvent (eventType t, const char *param, long n)
 idCameraEvent ()
void parse (const char *(*text))
void parse (const char *(*text))
void setTime (long n)
void setTime (long n)
void setTriggered (bool b)
void setTriggered (bool b)
const char * typeStr ()
const char * typeStr ()
void write (fileHandle_t file, const char *name)
void write (fileHandle_t file, const char *name)
 ~idCameraEvent ()
 ~idCameraEvent ()

Static Public Attributes

const char * eventStr [EVENT_COUNT]
const char * eventStr [EVENT_COUNT]

Protected Attributes

idStr paramStr
long time
bool triggered
eventType type

Member Enumeration Documentation

enum eventType
 

Enumeration values:
EVENT_NA 
EVENT_WAIT 
EVENT_TARGETWAIT 
EVENT_SPEED 
EVENT_TARGET 
EVENT_SNAPTARGET 
EVENT_FOV 
EVENT_SCRIPT 
EVENT_TRIGGER 
EVENT_STOP 
EVENT_COUNT 

Definition at line 744 of file splines.h.

00744                    {
00745         EVENT_NA = 0x00,
00746         EVENT_WAIT,
00747         EVENT_TARGETWAIT,
00748         EVENT_SPEED,
00749         EVENT_TARGET,
00750         EVENT_SNAPTARGET,
00751         EVENT_FOV,
00752         EVENT_SCRIPT,
00753         EVENT_TRIGGER,
00754         EVENT_STOP,
00755         EVENT_COUNT
00756     };

enum eventType
 

Enumeration values:
EVENT_NA 
EVENT_WAIT 
EVENT_TARGETWAIT 
EVENT_SPEED 
EVENT_TARGET 
EVENT_SNAPTARGET 
EVENT_FOV 
EVENT_SCRIPT 
EVENT_TRIGGER 
EVENT_STOP 
EVENT_COUNT 

Definition at line 737 of file splines.h.

00737                    {
00738         EVENT_NA = 0x00,
00739         EVENT_WAIT,
00740         EVENT_TARGETWAIT,
00741         EVENT_SPEED,
00742         EVENT_TARGET,
00743         EVENT_SNAPTARGET,
00744         EVENT_FOV,
00745         EVENT_SCRIPT,
00746         EVENT_TRIGGER,
00747         EVENT_STOP,
00748         EVENT_COUNT
00749     };


Constructor & Destructor Documentation

idCameraEvent  )  [inline]
 

Definition at line 753 of file splines.h.

References time().

00753                     {
00754         paramStr = "";
00755         type = EVENT_NA;
00756         time = 0;
00757     }

Here is the call graph for this function:

idCameraEvent eventType  t,
const char *  param,
long  n
[inline]
 

Definition at line 759 of file splines.h.

References time().

00759                                                           {
00760         type = t;
00761         paramStr = param;
00762         time = n;
00763     }

Here is the call graph for this function:

~idCameraEvent  )  [inline]
 

Definition at line 765 of file splines.h.

00765 {};

idCameraEvent  )  [inline]
 

Definition at line 760 of file splines.h.

References time().

00760                     {
00761         paramStr = "";
00762         type = EVENT_NA;
00763         time = 0;
00764     }

Here is the call graph for this function:

idCameraEvent eventType  t,
const char *  param,
long  n
[inline]
 

Definition at line 766 of file splines.h.

References time().

00766                                                           {
00767         type = t;
00768         paramStr = param;
00769         time = n;
00770     }

Here is the call graph for this function:

~idCameraEvent  )  [inline]
 

Definition at line 772 of file splines.h.

00772 {};


Member Function Documentation

const char* getParam  )  [inline]
 

Definition at line 782 of file splines.h.

00782                            {
00783         return paramStr.c_str();
00784     }

const char* getParam  )  [inline]
 

Definition at line 775 of file splines.h.

Referenced by CDlgCamera::setupFromCamera().

00775                            {
00776         return paramStr.c_str();
00777     }

long getTime  )  [inline]
 

Definition at line 786 of file splines.h.

00786                    {
00787         return time;
00788     }

long getTime  )  [inline]
 

Definition at line 779 of file splines.h.

Referenced by idCameraDef::sortEvents().

00779                    {
00780         return time;
00781     }

bool getTriggered  )  [inline]
 

Definition at line 801 of file splines.h.

00801                         {
00802         return triggered;
00803     }

bool getTriggered  )  [inline]
 

Definition at line 794 of file splines.h.

00794                         {
00795         return triggered;
00796     }

eventType getType  )  [inline]
 

Definition at line 774 of file splines.h.

00774                         {
00775         return type;
00776     }

eventType getType  )  [inline]
 

Definition at line 767 of file splines.h.

00767                         {
00768         return type;
00769     }

void parse const char **  text  ) 
 

void parse const char **  text  ) 
 

Definition at line 808 of file splines.cpp.

References atoi, idStr::c_str(), Com_MatchToken(), Com_Parse(), Com_ParseOnLine(), Com_UngetToken(), paramStr, Q_stricmp(), strcmp(), time, and token.

Referenced by idCameraDef::parse().

00808                                                {
00809     const char *token;
00810     Com_MatchToken( text, "{" );
00811     do {
00812         token = Com_Parse( text );
00813     
00814         if ( !token[0] ) {
00815             break;
00816         }
00817         if ( !strcmp (token, "}") ) {
00818             break;
00819         }
00820 
00821         // here we may have to jump over brush epairs ( only used in editor )
00822         do {
00823             // if token is not a brace, it is a key for a key/value pair
00824             if ( !token[0] || !strcmp (token, "(") || !strcmp(token, "}")) {
00825                 break;
00826             }
00827 
00828             Com_UngetToken();
00829             idStr key = Com_ParseOnLine(text);
00830             const char *token = Com_Parse(text);
00831             if (Q_stricmp(key.c_str(), "type") == 0) {
00832                 type = static_cast<idCameraEvent::eventType>(atoi(token));
00833             } else if (Q_stricmp(key.c_str(), "param") == 0) {
00834                 paramStr = token;
00835             } else if (Q_stricmp(key.c_str(), "time") == 0) {
00836                 time = atoi(token);
00837             }
00838             token = Com_Parse(text);
00839 
00840         } while (1);
00841 
00842         if ( !strcmp (token, "}") ) {
00843             break;
00844         }
00845 
00846     } while (1);
00847  
00848     Com_UngetToken();
00849     Com_MatchToken( text, "}" );
00850 }

Here is the call graph for this function:

void setTime long  n  )  [inline]
 

Definition at line 790 of file splines.h.

References time().

00790                          {
00791         time = n;
00792     }

Here is the call graph for this function:

void setTime long  n  )  [inline]
 

Definition at line 783 of file splines.h.

References time().

00783                          {
00784         time = n;
00785     }

Here is the call graph for this function:

void setTriggered bool  b  )  [inline]
 

Definition at line 797 of file splines.h.

00797                               {
00798         triggered = b;
00799     }

void setTriggered bool  b  )  [inline]
 

Definition at line 790 of file splines.h.

00790                               {
00791         triggered = b;
00792     }

const char* typeStr  )  [inline]
 

Definition at line 778 of file splines.h.

00778                           {
00779         return eventStr[static_cast<int>(type)];
00780     }

const char* typeStr  )  [inline]
 

Definition at line 771 of file splines.h.

Referenced by CDlgCamera::setupFromCamera().

00771                           {
00772         return eventStr[static_cast<int>(type)];
00773     }

void write fileHandle_t  file,
const char *  name
 

void write fileHandle_t  file,
const char *  name
 

Definition at line 852 of file splines.cpp.

References idStr::c_str(), FS_Write(), idStr::length(), name, paramStr, s, time, and va().

00852                                                              {
00853     idStr s = va("\t%s {\n", name);
00854     FS_Write(s.c_str(), s.length(), file);
00855     s = va("\t\ttype %d\n", static_cast<int>(type));
00856     FS_Write(s.c_str(), s.length(), file);
00857     s = va("\t\tparam %s\n", paramStr.c_str());
00858     FS_Write(s.c_str(), s.length(), file);
00859     s = va("\t\ttime %d\n", time);
00860     FS_Write(s.c_str(), s.length(), file);
00861     s = "\t}\n";
00862     FS_Write(s.c_str(), s.length(), file);
00863 }

Here is the call graph for this function:


Field Documentation

const char* eventStr[EVENT_COUNT] [static]
 

Definition at line 758 of file splines.h.

const char * eventStr [static]
 

Initial value:

 {
    "NA",
    "WAIT",
    "TARGETWAIT",
    "SPEED",
    "TARGET",
    "SNAPTARGET",
    "FOV",
    "SCRIPT",
    "TRIGGER",
    "STOP"
}

Definition at line 789 of file splines.cpp.

idStr paramStr [protected]
 

Definition at line 807 of file splines.h.

Referenced by parse(), and write().

long time [protected]
 

Definition at line 808 of file splines.h.

Referenced by parse(), and write().

bool triggered [protected]
 

Definition at line 809 of file splines.h.

eventType type [protected]
 

Definition at line 806 of file splines.h.


The documentation for this class was generated from the following files:
Generated on Thu Aug 25 19:53:17 2005 for Quake III Arena by  doxygen 1.3.9.1