Giter Club home page Giter Club logo

reflector's Introduction

reflector

NOTE: This is still a major work in progress. Right now the tool mostly works, but is ugly, generates crappy code, and has bugs. Use at your own risk.

Pull requests welcomed and encouraged and begged for!

What is it?

Reflector is a tool similar to the Unreal Header Tool. It will scan the headers in you codebase for types/methods/fields annotated with a special reflection syntax. It will then create files containing reflection information about those entities. The main type of file it will create is the *.mirror file, which you are meant to include in the files Reflector is scanning. This will inject reflection information straight into your files, allowing for compile-time reflection of these entities.

#include "Component.h.mirror"

RClass()
class Component : public Reflector::Reflectable
{
	RBody()

	RField({"ReadOnly": true, "Required": true, "Setter": false})
	std::string Name;

	RMethod()
	void SetName(std::string_view name) { Name = name; }
	
protected:

	RField({"ParentPointer": true})
	class Object* mParentObject = nullptr;
};

REnum()
enum class TestEnum
{
	A = 5,
	B,
	C
};

How to use

See Usage in the wiki.

Example

See the example in the wiki.

Dependencies

reflector's People

Contributors

ghassanpl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.