Sha256: 29816d6c29b7734a17e16333e007996b130a96d14b94846a77cb8cc9a05f5854

Contents?: true

Size: 817 Bytes

Versions: 7

Compression:

Stored size: 817 Bytes

Contents

#ifndef Rice__Return__hpp_
#define Rice__Return__hpp_

#include <any>

namespace Rice
{
  //! Helper for defining Return argument of a method

  class Return
  {
  public:
    //! Specifies Ruby should take ownership of the returned value
    Return& takeOwnership();

    //! Does Ruby own the returned value?
    bool isOwner();

    //! Specifies the returned value is a Ruby value
    Return& setValue();

    //! Is the returned value a Ruby value?
    bool isValue() const;

    //! Tell the returned object to keep alive the receving object
    Return& keepAlive();

    //! Is the returned value being kept alive?
    bool isKeepAlive() const;

  private:
    bool isKeepAlive_ = false;
    bool isOwner_ = false;
    bool isValue_ = false;
  };
} // Rice

#include "Return.ipp"

#endif // Rice__Return__hpp_

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rice-4.3.3 rice/Return.hpp
rice-4.3.2 rice/Return.hpp
rice-4.3.1 rice/Return.hpp
rice-4.3.0 rice/Return.hpp
rice-4.2.1 rice/Return.hpp
rice-4.2.0 rice/Return.hpp
rice-4.1.0 rice/Return.hpp