Sha256: b116929a3c697a710067b882cf8384a87a01de9583efb0b0f70a6a584b6b0207

Contents?: true

Size: 842 Bytes

Versions: 39

Compression:

Stored size: 842 Bytes

Contents

// -*- c++ -*-
#pragma once
#ifndef __RUCY_SYMBOL_H__
#define __RUCY_SYMBOL_H__


#include <rucy/ruby.h>


#define RUCY_SYMBOL(name, str) static const Rucy::Symbol name (str)

#define RUCY_SYM(s)   RUCY_SYMBOL(s, #s)
#define RUCY_SYM_Q(s) RUCY_SYMBOL(s, #s "?")
#define RUCY_SYM_B(s) RUCY_SYMBOL(s, #s "!")


namespace Rucy
{


	class Value;


	class Symbol
	{

		public:

			Symbol ();

			Symbol (const char* s);

			Symbol (const char* s, size_t len);

			Symbol (RubySymbol symbol);

			RubySymbol symbol () const;

			Value value () const;

			const char* c_str () const;

			operator bool () const;

			bool operator ! () const;

			friend bool operator == (const Symbol& lhs, const Symbol& rhs);

			friend bool operator != (const Symbol& lhs, const Symbol& rhs);

		private:

			RubySymbol sym;

	};// Symbol


}// Rucy


#endif//EOH

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
rucy-0.3 include/rucy/symbol.h
rucy-0.2.1 include/rucy/symbol.h
rucy-0.2 include/rucy/symbol.h
rucy-0.1.44 include/rucy/symbol.h
rucy-0.1.43 include/rucy/symbol.h
rucy-0.1.42 include/rucy/symbol.h
rucy-0.1.41 include/rucy/symbol.h
rucy-0.1.40 include/rucy/symbol.h
rucy-0.1.39 include/rucy/symbol.h
rucy-0.1.38 include/rucy/symbol.h
rucy-0.1.37 include/rucy/symbol.h
rucy-0.1.36 include/rucy/symbol.h
rucy-0.1.35 include/rucy/symbol.h
rucy-0.1.34 include/rucy/symbol.h
rucy-0.1.33 include/rucy/symbol.h
rucy-0.1.32 include/rucy/symbol.h
rucy-0.1.31 include/rucy/symbol.h
rucy-0.1.30 include/rucy/symbol.h
rucy-0.1.29 include/rucy/symbol.h
rucy-0.1.28 include/rucy/symbol.h