Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

StubSoundImplementation.h

Go to the documentation of this file.
00001 /****************** <SNX heading BEGIN do not edit this line> *****************
00002  *
00003  * sonix
00004  *
00005  * Original Authors:
00006  *   Kevin Meinert, Carolina Cruz-Neira
00007  *
00008  * -----------------------------------------------------------------
00009  * File:          $RCSfile: StubSoundImplementation.h,v $
00010  * Date modified: $Date: 2003/12/01 21:55:42 $
00011  * Version:       $Revision: 1.18 $
00012  * -----------------------------------------------------------------
00013  *
00014  ****************** <SNX heading END do not edit this line> ******************/
00015 /*************** <auto-copyright.pl BEGIN do not edit this line> **************
00016  *
00017  * VR Juggler is (C) Copyright 1998-2003 by Iowa State University
00018  *
00019  * Original Authors:
00020  *   Allen Bierbaum, Christopher Just,
00021  *   Patrick Hartling, Kevin Meinert,
00022  *   Carolina Cruz-Neira, Albert Baker
00023  *
00024  * This library is free software; you can redistribute it and/or
00025  * modify it under the terms of the GNU Library General Public
00026  * License as published by the Free Software Foundation; either
00027  * version 2 of the License, or (at your option) any later version.
00028  *
00029  * This library is distributed in the hope that it will be useful,
00030  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00031  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00032  * Library General Public License for more details.
00033  *
00034  * You should have received a copy of the GNU Library General Public
00035  * License along with this library; if not, write to the
00036  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00037  * Boston, MA 02111-1307, USA.
00038  *
00039  *************** <auto-copyright.pl END do not edit this line> ***************/
00040 
00041 /* Generated by Together */
00042 
00043 #ifndef SNXSTUBSOUNDIMPLEMENTATION_H
00044 #define SNXSTUBSOUNDIMPLEMENTATION_H
00045 #include <string>
00046 #include <boost/concept_check.hpp>
00047 #include <gmtl/Math.h>
00048 #include <gmtl/Matrix.h>
00049 #include <gmtl/Vec.h>
00050 #include <gmtl/MatrixOps.h>
00051 #include <gmtl/VecOps.h>
00052 #include <gmtl/Xforms.h>
00053 
00054 #include "snx/SoundImplementation.h"
00055 #include "snx/SoundInfo.h"
00056 #include "snx/SoundAPIInfo.h"
00057 #include "snx/Util/Debug.h"
00058 
00059 namespace snx
00060 {
00061 
00062 class StubSoundImplementation : public snx::SoundImplementation
00063 {
00064 public:
00068    StubSoundImplementation() : snx::SoundImplementation() { this->setName( "Stub" ); }
00069 
00073    virtual ~StubSoundImplementation()
00074    {
00075    }
00076 
00080    virtual void clone( snx::ISoundImplementation* &newCopy )
00081    {
00082       StubSoundImplementation* temp = new StubSoundImplementation;
00083 
00084       // copy state, so that we return a true "clone"
00085       temp->copy( *this );
00086       
00087       newCopy = temp;
00088    }
00089    
00096    virtual void trigger( const std::string & alias, const int & looping = 0 )
00097    {
00098       snx::SoundImplementation::trigger( alias, looping );
00099       this->lookup( alias ).triggerOnNextBind = true;
00100       // do nothing
00101       //std::cout << "[snx]Stub::trigger (does nothing)\n"<<std::flush;
00102    }
00103 
00108    virtual void stop( const std::string & alias )
00109    {
00110       snx::SoundImplementation::stop( alias );
00111       this->lookup( alias ).triggerOnNextBind = false;
00112       // do nothing
00113       //std::cout << "[snx]Stub::stop (does nothing)\n"<<std::flush;
00114    }
00115 
00119    virtual void setPosition( const std::string& alias, float x, float y, float z )
00120    {
00121       snx::SoundImplementation::setPosition( alias, x, y, z );
00122    }
00123 
00129    virtual void getPosition( const std::string& alias, float& x, float& y, float& z )
00130    {
00131       snx::SoundImplementation::getPosition( alias, x, y, z );
00132    }
00133    
00137    virtual void setListenerPosition( const gmtl::Matrix44f& mat )
00138    {
00139       snx::SoundImplementation::setListenerPosition( mat );
00140    }
00141 
00145    virtual void getListenerPosition( gmtl::Matrix44f& mat )
00146    {
00147       snx::SoundImplementation::getListenerPosition( mat );
00148    }
00149    
00156    virtual int startAPI()
00157    {
00158        vpr::DebugOutputGuard output1(snxDBG, vprDBG_CONFIG_LVL, std::string("Stub::startAPI (does nothing)\n"), std::string("\n"));
00159        return 1;
00160    }
00161    
00167    virtual void shutdownAPI()
00168    {
00169       vpr::DebugOutputGuard output2(snxDBG, vprDBG_CONFIG_LVL, std::string("Stub::shutdownAPI (does nothing)\n"), std::string("\n"));
00170    }   
00171 
00176    virtual bool isStarted() const
00177    {
00178       return true;
00179    }
00180 
00181    virtual void configure( const snx::SoundAPIInfo& sai )
00182    {
00183       // nothing to do, call the base impl...
00184       SoundImplementation::configure( sai );
00185    }   
00186    
00195    virtual void configure( const std::string& alias, const snx::SoundInfo& description )
00196    {
00197       snx::SoundImplementation::configure( alias, description );
00198       // do nothing
00199    }
00200 
00205    virtual void remove( const std::string& alias )
00206    {
00207       snx::SoundImplementation::remove( alias );
00208       // do nothing
00209    }
00210 
00215    virtual void clear()
00216    {
00217    }   
00218    
00223    virtual void bindAll()
00224    {
00225    }   
00226 
00231    virtual void unbindAll()
00232    {
00233    }
00234 
00239    virtual void bind( const std::string& alias )
00240    {
00241       boost::ignore_unused_variable_warning(alias);
00242    }   
00243 
00248    virtual void unbind( const std::string& alias )
00249    {
00250       boost::ignore_unused_variable_warning(alias);
00251    }
00252 
00258    virtual void step( const float & timeElapsed )
00259    {
00260       snx::SoundImplementation::step( timeElapsed );
00261       // do nothing
00262    }
00263 
00268    void operator delete(void* p)
00269    {
00270       ::operator delete(p);
00271    }
00272 
00273 protected:
00278    virtual void destroy()
00279    {
00280       delete this;
00281    }
00282 
00283 private:  
00284 
00286    /*#  snx::SoundInfo lnkSoundInfo; */
00287 
00289    /*#  snx::SoundAPIInfo lnkSoundAPIInfo; */
00290 };
00291 
00292 } // end namespace
00293 
00294 #endif //SNXSTUBSOUNDIMPLEMENTATION_H

Generated on Sun May 2 14:39:26 2004 for Juggler Sonix by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002