soundstreamid.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                       soundstreamid.h  -  description
00003                              -------------------
00004     begin                : Sun Aug 1 2004
00005     copyright            : (C) 2004 by Martin Witte
00006     email                : witte@kawo1.rwth-aachen.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef KRADIO_SOUNDSTREAMID_H
00019 #define KRADIO_SOUNDSTREAMID_H
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 class SoundStreamID {
00026 
00027     SoundStreamID(int _id, int _phys_id);
00028 public:
00029     SoundStreamID();
00030     SoundStreamID(const SoundStreamID &org);
00031 
00032     SoundStreamID &operator = (const SoundStreamID &id);
00033 
00034     static SoundStreamID createNewID();
00035     static SoundStreamID createNewID(const SoundStreamID &oldID);
00036 
00037     bool operator == (const SoundStreamID id) const { return m_ID == id.m_ID; }
00038     bool operator != (const SoundStreamID id) const { return m_ID != id.m_ID; }
00039     bool operator >  (const SoundStreamID id) const { return m_ID >  id.m_ID; }
00040     bool operator <  (const SoundStreamID id) const { return m_ID <  id.m_ID; }
00041     bool operator >= (const SoundStreamID id) const { return m_ID >= id.m_ID; }
00042     bool operator <= (const SoundStreamID id) const { return m_ID <= id.m_ID; }
00043 
00044     bool HasSamePhysicalID(const SoundStreamID &x) const { return m_PhysicalID == x.m_PhysicalID; }
00045 
00046     bool isValid() const { return m_ID != 0; } // m_PhysicalID is not checked!
00047     void invalidate();
00048 
00049     static const SoundStreamID InvalidID;
00050 
00051     int getID() const { return m_ID; }
00052     int getPhysicalID() const { return m_PhysicalID; }
00053 
00054 protected:
00055     unsigned m_ID;
00056     unsigned m_PhysicalID;
00057     static unsigned nextID;
00058     static unsigned nextPhysicalID;
00059 };
00060 
00061 
00062 #endif
00063 

Generated on Fri Jan 28 16:42:13 2011 for kradio by  doxygen 1.4.7