Sha256: 1954b8eb23e0f6e17cbcd9d5841b64cb09c6dc41e5393f4bab42b759e8c0a67f

Contents?: true

Size: 1.02 KB

Versions: 27

Compression:

Stored size: 1.02 KB

Contents

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


#include <rucy/class.h>
#include <rucy/extension.h>
#include <rays/ruby/image.h>
#include <rays/ruby/painter.h>
#include <reflex/filter.h>


RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Reflex::Filter)


namespace Reflex
{


	Rucy::Class filter_class ();
	// class Reflex::Filter


	template <typename T>
	class RubyFilter : public Rucy::ClassWrapper<T>
	{

		typedef Rucy::ClassWrapper<T> Super;

		public:

			virtual void apply (Painter* painter, const Image& image) const
			{
				RUCY_SYM(apply);
				if (this->is_overridable())
					this->value.call(apply, Rucy::value(painter), Rucy::value(image));
				else
					Super::apply(painter, image);
			}

	};// RubyFilter


}// Reflex


namespace Rucy
{


	template <> inline Class
	get_ruby_class<Reflex::Filter> ()
	{
		return Reflex::filter_class();
	}

	inline Value
	value (Reflex::Filter::Ref& ref, Value klass = Reflex::filter_class())
	{
		return value(ref.get(), klass);
	}


}// Rucy


#endif//EOH

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
reflexion-0.2.1 include/reflex/ruby/filter.h
reflexion-0.2 include/reflex/ruby/filter.h
reflexion-0.1.57 include/reflex/ruby/filter.h
reflexion-0.1.56 include/reflex/ruby/filter.h
reflexion-0.1.55 include/reflex/ruby/filter.h
reflexion-0.1.54 include/reflex/ruby/filter.h
reflexion-0.1.53 include/reflex/ruby/filter.h
reflexion-0.1.52 include/reflex/ruby/filter.h
reflexion-0.1.51 include/reflex/ruby/filter.h
reflexion-0.1.50 include/reflex/ruby/filter.h
reflexion-0.1.49 include/reflex/ruby/filter.h
reflexion-0.1.48 include/reflex/ruby/filter.h
reflexion-0.1.47 include/reflex/ruby/filter.h
reflexion-0.1.46 include/reflex/ruby/filter.h
reflexion-0.1.45 include/reflex/ruby/filter.h
reflexion-0.1.44 include/reflex/ruby/filter.h
reflexion-0.1.43 include/reflex/ruby/filter.h
reflexion-0.1.42 include/reflex/ruby/filter.h
reflexion-0.1.41 include/reflex/ruby/filter.h
reflexion-0.1.40 include/reflex/ruby/filter.h