chxavcompositecommand.h
上传用户:dangjiwu
上传日期:2013-07-19
资源大小:42019k
文件大小:1k
源码类别:

Symbian

开发平台:

Visual C++

  1. /************************************************************************
  2.  * chxavcompositecommand.h
  3.  * -----------------------
  4.  *
  5.  * Synopsis:
  6.  * 
  7.  *
  8.  * aggregated command object
  9.  *
  10.  * commands (actions) are executed in order of addition
  11.  * copying the command object implies sharing a reference to the aggregated list
  12.  *
  13.  * Target:
  14.  * Symbian OS
  15.  *
  16.  *
  17.  * (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
  18.  *
  19.  ************************************************************************/ 
  20. #ifndef _chxavcompositecommand_h_
  21. #define _chxavcompositecommand_h_
  22. // Helix includes...
  23. #include "hxlist.h"
  24. // Includes from this project...
  25. #include "chxavcommand.h"
  26. // class CHXAvCompositeCommand
  27. class CHXAvCompositeCommand
  28. : public CHXAvCommand
  29. {
  30. public:
  31.     typedef void* CID; // command id
  32. // CHXAvCommand
  33.     CHXAvCompositeCommand() {};
  34.     CHXAvCompositeCommand(const CHXAvCompositeCommand& rhs);
  35.     virtual ~CHXAvCompositeCommand();
  36.     virtual void Execute();
  37.     virtual CHXAvCommand* CloneL() const;
  38. // CHXAvCompositeCommand
  39.     CID AppendL(const CHXAvCommand& cmd);
  40.     void Remove(CID idCommand);
  41. private:
  42.     CHXSimpleList m_commands;
  43.     TInt m_nextId;
  44. };
  45. ////////////////////////////////////////
  46. // instanciate a copy
  47. inline
  48. CHXAvCommand* CHXAvCompositeCommand::CloneL() const
  49.     return new (ELeave) CHXAvCompositeCommand(*this); 
  50. }
  51. #endif // EP_COMPOSITE_COMMAND_INCLUDED__