Sha256: 3c5220d2e792618a0c7bfe733b89b2c5d1611681df4aa9dddbc047fec549615b

Contents?: true

Size: 554 Bytes

Versions: 4

Compression:

Stored size: 554 Bytes

Contents

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


#include <ruby.h>


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

#define SYM(s)   SYMBOL(s, #s)
#define SYM_Q(s) SYMBOL(s, #s "?")
#define SYM_B(s) SYMBOL(s, #s "!")


namespace Rucy
{


	class Symbol
	{

		public:

			Symbol ();

			Symbol (ID id);

			Symbol (const char* str);

			ID id () const;

			const char* c_str () const;

			operator bool () const;

			bool operator ! () const;

		private:

			ID id_;

	};// Symbol


}// Rucy


#endif//EOH

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rucy-0.1.3 include/rucy/symbol.h
rucy-0.1.2 include/rucy/symbol.h
rucy-0.1.1 include/rucy/symbol.h
rucy-0.1.0 include/rucy/symbol.h