CrystalSpace

Public API Reference

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

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 = 0) = 0;
00097 
00102   virtual void AddRunSequence (csTicks time, iSequence* sequence,
00103         iBase* params = 0) = 0;
00104 
00110   virtual void AddCondition (csTicks time, iSequenceCondition* condition,
00111         iSequence* trueSequence, iSequence* falseSequence,
00112         iBase* params = 0) = 0;
00113 
00119   virtual void AddLoop (csTicks time, iSequenceCondition* condition,
00120         iSequence* sequence, iBase* params = 0) = 0;
00121 
00125   virtual void Clear () = 0;
00126 
00130   virtual bool IsEmpty () = 0;
00131 };
00132 
00133 SCF_VERSION (iSequenceManager, 0, 1, 0);
00134 
00140 struct iSequenceManager : public iBase
00141 {
00146   virtual void Clear () = 0;
00147 
00152   virtual bool IsEmpty () = 0;
00153 
00162   virtual void Suspend () = 0;
00163 
00169   virtual void Resume () = 0;
00170 
00174   virtual bool IsSuspended () = 0;
00175 
00188   virtual void TimeWarp (csTicks time, bool skip) = 0;
00189 
00200   virtual csTicks GetMainTime () const = 0;
00201 
00206   virtual csTicks GetDeltaTime () const = 0;
00207 
00213   virtual iSequence* NewSequence () = 0;
00214 
00227   virtual void RunSequence (csTicks time, iSequence* sequence,
00228         iBase* params = 0) = 0;
00229 };
00230 
00231 #endif // __CS_IVARIA_SEQUENCE_H__
00232 

Generated for Crystal Space by doxygen 1.2.14