Sha256: d6ca7928b13b3217444bfcc2bb0bc9b3fc98ab76d4ea31744a66684bae9aacf1

Contents?: true

Size: 970 Bytes

Versions: 38

Compression:

Stored size: 970 Bytes

Contents

#ifndef Rice__Identifier__hpp_
#define Rice__Identifier__hpp_

#include "detail/ruby.hpp"
#include <string>

namespace Rice
{

class Symbol;

//! A wrapper for the ID type
/*! An ID is ruby's internal representation of a Symbol object.
 */
class Identifier
{
public:
  //! Construct a new Identifier from an ID.
  Identifier(ID id);

  //! Construct a new Identifier from a Symbol.
  Identifier(Symbol const & symbol);

  //! Construct a new Identifier from a string.
  Identifier(char const * s = "");

  //! Return a string representation of the Identifier.
  char const * c_str() const;

  //! Return a string representation of the Identifier.
  std::string str() const;

  //! Return the underlying ID
  ID id() const { return id_; }

  //! Return the underlying ID
  operator ID() const { return id_; }

  //! Return the ID as a Symbol
  VALUE to_sym() const;

private:
  ID id_;
};

} // namespace Rice

#include "Identifier.ipp"

#endif // Rice__Identifier__hpp_

Version data entries

38 entries across 38 versions & 6 rubygems

Version Path
rice-3.0.0 rice/Identifier.hpp
rice2-2.2.1 rice/Identifier.hpp
rice2-2.2.0 rice/Identifier.hpp
rice-2.2.0 rice/Identifier.hpp
rice-2.1.3 rice/Identifier.hpp
rice-2.1.2 rice/Identifier.hpp
rice-2.1.1 rice/Identifier.hpp
rice-2.1.0 rice/Identifier.hpp
rice-2.0.0 rice/Identifier.hpp
rice-1.7.0 rice/Identifier.hpp
rice-1.6.3 rice/Identifier.hpp
jameskilton-rice-1.2.0 rice/Identifier.hpp
rice-1.6.2 rice/Identifier.hpp
rice-1.6.1 rice/Identifier.hpp
rice-1.6.0 rice/Identifier.hpp
rice-1.6.0.pre rice/Identifier.hpp
rice-1.5.3 rice/Identifier.hpp
rice-1.5.2 rice/Identifier.hpp
keyme-rice-1.5.1.keyme1 rice/Identifier.hpp
keyme-rice-1.5.1.keyme rice/Identifier.hpp