CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class 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, 2, 0);
00027 
00041 struct iSequenceOperation : public iBase
00042 {
00051   virtual void Do (csTicks dt, iBase* params) = 0;
00052 
00058   virtual void CleanupSequences () = 0;
00059 };
00060 
00061 SCF_VERSION (iSequenceCondition, 0, 1, 0);
00062 
00076 struct iSequenceCondition : public iBase
00077 {
00086   virtual bool Condition (csTicks dt, iBase* params) = 0;
00087 };
00088 
00089 struct csSequenceOp
00090 {
00091   csSequenceOp* next, * prev;
00092   csTicks time;
00093   csRef<iBase> params;
00094   csRef<iSequenceOperation> operation;
00095 
00096   csSequenceOp () { }
00097   ~csSequenceOp () { }
00098 };
00099 
00100 
00101 SCF_VERSION (iSequence, 0, 0, 2);
00102 
00118 struct iSequence : public iBase
00119 {
00123   virtual csSequenceOp* GetFirstSequence () = 0;
00124 
00129   virtual void AddOperation (csTicks time, iSequenceOperation* operation,
00130         iBase* params = 0) = 0;
00131 
00136   virtual void AddRunSequence (csTicks time, iSequence* sequence,
00137         iBase* params = 0) = 0;
00138 
00144   virtual void AddCondition (csTicks time, iSequenceCondition* condition,
00145         iSequence* trueSequence, iSequence* falseSequence,
00146         iBase* params = 0) = 0;
00147 
00153   virtual void AddLoop (csTicks time, iSequenceCondition* condition,
00154         iSequence* sequence, iBase* params = 0) = 0;
00155 
00159   virtual void Clear () = 0;
00160 
00164   virtual bool IsEmpty () = 0;
00165 };
00166 
00167 SCF_VERSION (iSequenceManager, 0, 1, 0);
00168 
00187 struct iSequenceManager : public iBase
00188 {
00193   virtual void Clear () = 0;
00194 
00199   virtual bool IsEmpty () = 0;
00200 
00209   virtual void Suspend () = 0;
00210 
00216   virtual void Resume () = 0;
00217 
00221   virtual bool IsSuspended () = 0;
00222 
00235   virtual void TimeWarp (csTicks time, bool skip) = 0;
00236 
00247   virtual csTicks GetMainTime () const = 0;
00248 
00253   virtual csTicks GetDeltaTime () const = 0;
00254 
00260   virtual csPtr<iSequence> NewSequence () = 0;
00261 
00274   virtual void RunSequence (csTicks time, iSequence* sequence,
00275         iBase* params = 0) = 0;
00276 };
00277 
00278 #endif // __CS_IVARIA_SEQUENCE_H__
00279 

Generated for Crystal Space by doxygen 1.3.9.1