Sha256: 875329d8a18fec61abfb95a3a01805deeaef62f774d75f5c310f74fb7cf07df4

Contents?: true

Size: 1.07 KB

Versions: 14

Compression:

Stored size: 1.07 KB

Contents

#ifndef Rice__Director__hpp_
#define Rice__Director__hpp_

#include "Object.hpp"

namespace Rice {

  /**
   * A Director works exactly as a SWIG %director works (thus the name).
   * You use this class to help build proxy classes so that polymorphism
   * works from C++ into Ruby. See the main README for how this class works.
   */
  class Director 
  {
    public:
      //! Construct new Director. Needs the Ruby object so that the 
      //  proxy class can call methods on that object.
      Director(Object self);

      virtual ~Director() { }

      //! Raise a ruby exception when a call comes through for a pure virtual method
      /*! If a Ruby script calls 'super' on a method that's otherwise a pure virtual
       *  method, use this method to throw an exception in this case. 
       */
      void raisePureVirtual() const;

      //! Get the Ruby object linked to this C++ instance
      Object getSelf() const { return self_; }

    private:

      // Save the Ruby object related to the instance of this class
      Object self_;

  };
}

#endif // Rice__Director__hpp_

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rice-2.2.0 rice/Director.hpp
rice-2.1.3 rice/Director.hpp
rice-2.1.2 rice/Director.hpp
rice-2.1.1 rice/Director.hpp
rice-2.1.0 rice/Director.hpp
rice-2.0.0 rice/Director.hpp
rice-1.7.0 rice/Director.hpp
rice-1.6.3 rice/Director.hpp
rice-1.6.2 rice/Director.hpp
rice-1.6.1 rice/Director.hpp
rice-1.6.0 rice/Director.hpp
rice-1.6.0.pre rice/Director.hpp
rice-1.5.3 rice/Director.hpp
rice-1.5.2 rice/Director.hpp