CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

sequence.h

00001 /*
00002     Copyright (C) 2001 by Jorrit Tyberghein
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00019 #ifndef __CS_IVARIA_SEQUENCE_H__
00020 #define __CS_IVARIA_SEQUENCE_H__
00021 
00022 #include "csutil/scf.h"
00023 
00024 struct iSequenceManager;
00025 
00026 SCF_VERSION (iSequenceOperation, 0, 1, 0);
00027 
00032 struct iSequenceOperation : public iBase
00033 {
00042   virtual void Do (csTicks dt, iBase* params) = 0;
00043 };
00044 
00045 SCF_VERSION (iSequenceCondition, 0, 1, 0);
00046 
00051 struct iSequenceCondition : public iBase
00052 {
00061   virtual bool Condition (csTicks dt, iBase* params) = 0;
00062 };
00063 
00064 struct csSequenceOp
00065 {
00066   csSequenceOp* next, * prev;
00067   csTicks time;
00068   csRef<iBase> params;
00069   csRef<iSequenceOperation> operation;
00070 
00071   csSequenceOp () { }
00072   ~csSequenceOp () { }
00073 };
00074 
00075 
00076 SCF_VERSION (iSequence, 0, 0, 2);
00077 
00084 struct iSequence : public iBase
00085 {
00089   virtual csSequenceOp* GetFirstSequence () = 0;
00090 
00095   virtual void AddOperation (csTicks time, iSequenceOperation* operation,
00096         iBase* params = NULL) = 0;
00097 
00102   virtual void AddRunSequence (csTicks time, iSequence* sequence,
00103         iBase* params = NULL) = 0;
00104 
00110   virtual void AddCondition (csTicks time, iSequenceCondition* condition,
00111         iSequence* trueSequence, iSequence* falseSequence,
00112         iBase* params = NULL) = 0;
00113 
00118   virtual void AddLoop (csTicks time, iSequenceCondition* condition,
00119         iSequence* sequence, iBase* params = NULL) = 0;
00120 
00124   virtual void Clear () = 0;
00125 
00129   virtual bool IsEmpty () = 0;
00130 };
00131 
00132 SCF_VERSION (iSequenceManager, 0, 1, 0);
00133 
00139 struct iSequenceManager : public iBase
00140 {
00145   virtual void Clear () = 0;
00146 
00151   virtual bool IsEmpty () = 0;
00152 
00161   virtual void Suspend () = 0;
00162 
00168   virtual void Resume () = 0;
00169 
00173   virtual bool IsSuspended () = 0;
00174 
00187   virtual void TimeWarp (csTicks time, bool skip) = 0;
00188 
00199   virtual csTicks GetMainTime () const = 0;
00200 
00205   virtual csTicks GetDeltaTime () const = 0;
00206 
00212   virtual iSequence* NewSequence () = 0;
00213 
00226   virtual void RunSequence (csTicks time, iSequence* sequence,
00227         iBase* params = NULL) = 0;
00228 };
00229 
00230 #endif // __CS_IVARIA_SEQUENCE_H__
00231 

Generated for Crystal Space by doxygen 1.2.14