Sha256: 7d589537cd163202d61edf45f19242e46bca96485b2f1c5f83053aa2d31d7b8e

Contents?: true

Size: 968 Bytes

Versions: 36

Compression:

Stored size: 968 Bytes

Contents

// -*- c++ -*-
#include "rucy/rucy.h"


#include "rucy/exception.h"


namespace Rucy
{


	void
	init ()
	{
		static bool done = false;
		if (done) return;
		done = true;

		rucy_module();
		native_error_class();
		invalid_state_error_class();
		invalid_object_error_class();
		system_error_class();
	}


	Module
	rucy_module ()
	{
		static Module m = define_module("Rucy");
		return m;
	}

	Class
	native_error_class ()
	{
		static Class c =
			rucy_module().define_class("NativeError", rb_eRuntimeError);
		return c;
	}

	Class
	invalid_state_error_class ()
	{
		static Class c =
			rucy_module().define_class("InvalidStateError", native_error_class());
		return c;
	}

	Class
	invalid_object_error_class ()
	{
		static Class c =
			rucy_module().define_class("InvalidObjectError", native_error_class());
		return c;
	}

	Class
	system_error_class ()
	{
		static Class c =
			rucy_module().define_class("SystemError", native_error_class());
		return c;
	}


}// Rucy

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
rucy-0.1.44 src/rucy.cpp
rucy-0.1.43 src/rucy.cpp
rucy-0.1.42 src/rucy.cpp
rucy-0.1.41 src/rucy.cpp
rucy-0.1.40 src/rucy.cpp
rucy-0.1.39 src/rucy.cpp
rucy-0.1.38 src/rucy.cpp
rucy-0.1.37 src/rucy.cpp
rucy-0.1.36 src/rucy.cpp
rucy-0.1.35 src/rucy.cpp
rucy-0.1.34 src/rucy.cpp
rucy-0.1.33 src/rucy.cpp
rucy-0.1.32 src/rucy.cpp
rucy-0.1.31 src/rucy.cpp
rucy-0.1.30 src/rucy.cpp
rucy-0.1.29 src/rucy.cpp
rucy-0.1.28 src/rucy.cpp
rucy-0.1.27 src/rucy.cpp
rucy-0.1.26 src/rucy.cpp
rucy-0.1.25 src/rucy.cpp