root/juggler/tags/1.0.5/Sound/vjSoundHandle.h

Revision 2874, 2.0 kB (checked in by patrickh, 8 years ago)

Added the traditional #ifndef … #endif enclosing block so that the code
in this header will not be included multiple times.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*
2  * VR Juggler is (C) Copyright 1998, 1999, 2000 by Iowa State University
3  *
4  * Original Authors:
5  *   Allen Bierbaum, Christopher Just,
6  *   Patrick Hartling, Kevin Meinert,
7  *   Carolina Cruz-Neira, Albert Baker
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Library General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Library General Public License for more details.
18  *
19  * You should have received a copy of the GNU Library General Public
20  * License along with this library; if not, write to the
21  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22  * Boston, MA 02111-1307, USA.
23  *
24  * -----------------------------------------------------------------
25  * File:          $RCSfile$
26  * Date modified: $Date$
27  * Version:       $Revision$
28  * -----------------------------------------------------------------
29  */
30
31 #ifndef _VJ_SOUND_HANDLE_H_
32 #define _VJ_SOUND_HANDLE_H_
33
34
35 //: handle to a sound
36 //  This class may be used in future versions of juggler, for now ignore it.
37 //!PUBLIC_API:
38 class vjSoundHandle
39 {
40 public:
41    // creates stale by default...
42         vjSoundHandle() : mIdentifier( 0 ), mStale( true ), mName( "no name" )
43         {
44         }
45    
46    const std::string& name() const { return mName; }
47    const int&         id() const { return mIdentifier; }
48    const bool&        isStale() const { return mStale; }
49    
50 protected:
51    void               setName( const std::string& name ) { mName = name; }
52         void               setId( const int& id ) { mIdentifier = id; }
53    void               setStale( const bool& stale ) { mStale = stale; }
54    
55    friend class vjSoundManager;
56    
57 private:
58    bool mStale;
59         int mIdentifier;
60    std::string mName;
61 };
62
63
64 #endif
Note: See TracBrowser for help on using the browser.