C++ reflection library with Lua binding, and JSON and XML serialisation.

Overview

Ponder

Linux & OSX: Build Status - Windows: Build status

Currents status: 3.2-alpha. API is unstable as features added/changed.

New: Version 3

V1 replaced Boost with C++11. V2 added Lua bindings. V3 refactored to remove some warts, ease future development, and re-add serialisation. API is evolving.

About

Ponder is a C++ multi-purpose reflection library. It provides an abstraction for most of the high-level concepts of C++: classes, enumerations, functions, properties.

C++1x supplies better support for compile-time reflection. Runtime reflection involves baking compile-time reflection into the executable so this can be used at runtime. Ponder presents a simple API for baking your objects so that they can be used at runtime. The baking can also, optionally, userdata and support for Lua scripting.

Features:

  • API to expose C++ objects.
  • Runtime API to create objects, call functions, and read and modify properties.
  • Automatic Lua binding generation.

Links

Build

Compilers supported. Requires C++17.

  • MSVC 2017+
  • Xcode 8+
  • GCC 7+
  • Clang 3.9+

Ponder uses CMake to generate project files which are then used to build the project (Build docs). E.g. Use make to build Ponder (but you can use any build system CMake supports):

git clone https://github.com/billyquith/ponder.git
cd ponder
mkdir build && cd build
cmake -G "Unix Makefiles" ..
make

Package Managers

Windows vcpkg:

vcpkg install ponder

History

Ponder is a fork of CAMP, which has been retired by the original authors. CAMP relies on Boost, and is pre-C++11. In Ponder, the Boost dependency has been removed, and instead, C++11 features are used. CAMP was developed by Technogerma Systems France and then by Tegesoft.

See CHANGELOG.md and release notes for more details on Ponder changes.

Issues
  • classByType<std::string> throws classNotFound

    classByType throws classNotFound

    My code tries to declare a class which has a std::string property.

    Class::declare<Project>("projects") 
      .constructor<>()   
      .property("name", &Project::getname, &Project::setname) ;
    

    The code compiled but it threw classNotFound exception on classByTypestd::string() at runtime for some reason.

    #0  0x00007ffff1c32c1d in __cxa_throw () from /lib64/libstdc++.so.6
    #1  0x00007ffff290ad9f in ponder::detail::ClassManager::getById (
        this=0x7ffff2b43900 <ponder::detail::ClassManager::instance()::cm>, id=...)
        at /scratch/backup/ponder/src/classmanager.cpp:99
    #2  0x00000000005258cc in ponder::classByType<std::string> ()
        at include/ponder/classget.inl:57
    #3  0x0000000000742220 in ponder::detail::UserPropertyImpl<ponder::detail::Accessor2<Project, ponder::detail::FunctionTraits<std::string (Project::*)() const, void> > >::UserPropertyImpl (this=0x7fffc5dbcb00, name=..., accessor=...)
        at include/ponder/detail/userpropertyimpl.inl:64
    #4  0x0000000000741f27 in ponder::detail::PropertyFactory2<Project, std::string (Project::*)() const, void (Project::*)(std::string const&), void>::create (
        name=..., accessor1=
        (void (Project::*)(std::string *, const Project *)) 0x59eefc <Project::getname() const>, accessor2=
        (void (Project::*)(Project *, const std::string &)) 0x59ef30 <Project::setname(std::string const&)>)
        at include/ponder/detail/propertyfactory.hpp:392
    #5  0x000000000071d94b in ponder::ClassBuilder<Project>::property<std::string (Project::*)() const, void (Project::*)(std::string const&)> (
        this=0x7fff8a7dc4c0, name=..., accessor1=
        (void (Project::*)(std::string *, const Project *)) 0x59eefc <Project::getname() const>, accessor2=
        (void (Project::*)(Project *, const std::string &)) 0x59ef30 <Project::setname(std::string const&)>)
        include/ponder/classbuilder.inl:106
    
    (gdb) fr 2
    #2  0x00000000005258cc in ponder::classByType<std::string> ()
        at /ade/shhuang_exac/oracle/oss/thirdparty/ponder/include/ponder/classget.inl:57
    57          return detail::ClassManager::instance().getById(detail::typeId<T>());
    
    (gdb) fr 1
    #1  0x00007ffff290ad9f in ponder::detail::ClassManager::getById (
        this=0x7ffff2b43900 <ponder::detail::ClassManager::instance()::cm>, id=...)
        at /scratch/backup/ponder/src/classmanager.cpp:99
    99              PONDER_ERROR(ClassNotFound(id));
    

    Does anyone know what was going on here? The call was called by ponder implicitly. I added the following line in the example program simple.cpp and it threw the same runtime exception.

    const ponder::Class& metaclass2 = ponder::classByType<std::string>();
    

    simple.cpp's Person class also has a std::string property but it runs fine. What have I missed?

    Thanks,

    opened by shierei 26
  • Can ponder be used to build a generic data repository?

    Can ponder be used to build a generic data repository?

    We consider building a generic data repository (GDR) in which entries are stored in the following manner:

    struct Entry {
        const ponder::Class& metaClass;
        void* p;
    }
    

    If we have created some object of class T (with T being a class declared to ponder)

    T* pObject = ...
    

    we would store it in the GDR like this:

    someEntry.p = pObject;
    someEntry.metaClass = ponder::classByObject(*pObject);
    

    If that would work we could examine our GDR in a very generic way by initializing a ponder::UserObject for each entry and working with that ponder::UserObject through the reflection capabilities of ponder.

    Alas, for such a generic data repository to work some obstacles would have to be overcome.

    First of all, there currently is no functionality to initialize a ponder::UserObject from a ponder::Class and a void* pointer. (I'd guess this would be doable.)

    Second, we would also like to store PODs, std::string, std::array, std::vector and the like in the GDR. For those types, there is no direct support in ponder, i.e. it is not possible to simply declare those types to ponder and initialize a ponder::UserObject for it. One way would be to wrap those types into custom classes like

    template <typename T>
    struct PodWrapper
    {
        T value;
    };
    PONDER_TYPE(PodWrapper<uint8_t>)
    PONDER_TYPE(PodWrapper<uint16_t>)
    ...
    ponder::Class::declare<PodWrapper<uint8_t>>("PodWrapper<uint8_t>")
        .constructor()
        .property("Value", &PodWrapper<uint8_t>::value);
    ponder::Class::declare<PodWrapper<uint16_t>>("PodWrapper<uint16_t>")
        .constructor()
        .property("Value", &PodWrapper<uint16_t>::value);
    ...    
    

    but maybe there is some better way.

    I would be glad to hear your opinion on the subject of this issue.

    enhancement question 
    opened by Weeena 10
  • Investigate MSVC 2015 compiler crash

    Investigate MSVC 2015 compiler crash

    Debug build.

    c:\program files (x86)\microsoft visual studio 14.0\vc\include\type_traits(1416): fatal error C1001: An internal error has occurred in the compiler.
    1>  (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246)
    1>   To work around this problem, try simplifying or changing the program near the locations listed above.
    1>  Please choose the Technical Support command on the Visual C++
    1>   Help menu, or open the Technical Support help file for more information
    

    apparently related to:

    template<class _Callable,
        class... _Types> inline
        auto invoke(_Callable&& _Obj, _Types&&... _Args)
        -> decltype(_Invoker<_Callable, _Types...>::_Call(
            _STD forward<_Callable>(_Obj), _STD forward<_Types>(_Args)...))
        {   // INVOKE a callable object
        return (_Invoker<_Callable, _Types...>::_Call(
            _STD forward<_Callable>(_Obj), _STD forward<_Types>(_Args)...));
        }
    

    in <type_traits>.

    bug 
    opened by billyquith 8
  • Unresolved externals

    Unresolved externals

    Hey, I compiled ponder with MSVC2015 (generated project using the CMAKE file provided).

    In my project I set up the usual library linking paths and included ponder.lib and followed the code from the example code provided but I am getting unresolved external symbols (crazy big errors from VS). I'm fairly certain I have linked correctly (checked this over and over) but it doesn't seem to be linking.

    Could this be a build issue?

    Image of the errors: https://gyazo.com/29f2253c683a50b704c388afaa6b972d

    Class header file: https://gyazo.com/95f69c5bce8fce24b45d11f9622b568c Class source file: https://gyazo.com/a591b22d2312e1936b81f4d40257a40e Main : https://gyazo.com/c9b11549ce0de44a72dc77f79ab9c53e

    I've tried various things even included all the headers into my project incase their was some inline methods that were needed but still couldn't get it work.

    Really want to use this library, I have been looking for a few days for a nice c++ reflection library and this seems perfect for my needs :)

    bug 
    opened by NickCullen 8
  • Ponder compile failed with a future version of MSVC

    Ponder compile failed with a future version of MSVC

    Hello, I'm a member of Microsoft VCPKG, when I built this port in an internal version of Visual Studio, it failed with following errors: include\xstring(430): error C2027: use of undefined type 'std::basic_ostream<char,std::char_traits>' include\xstring(430): error C2065: 'iostate': undeclared identifier

    This issue due to a change in MSVC: <string> doesn't transitively include<ostream>. For fixing this issue, we need to add #include<ostream> into the source.

    Because there are multiple .cpp files that fail to compile due to this problem, in order to reduce the amount of modification, I hope to add modifications to a common header file, such as config.hpp.

    Could you please help me confirm if it is appropriate to modify in config.hpp?

    opened by Cheney-W 6
  • Having problems to get the property value of a user defined type

    Having problems to get the property value of a user defined type

    Suppose I define a object type as follows.

    typedef struct myObj
    {
      int a;
      int b;
    } myObj;
    PONDER_TYPE(myObj)
    

    And use it for a property type of the Person class in simple.cpp.

    class Person
    {
    public:
      myObj getObj() const { return m_obj; }
      void setObj(const myObj& obj) { m_obj = obj; }
    ...
    private:
      myObj m_obj;
    ...
    }
    

    Register it.

       ponder::Class::declare<myObj>("myObj");
       ponder::Class::declare<Person>("Person")
            .constructor<std::string>()
            .property("obj", &Person::getObj, &Person::setObj)
    ...
    

    Testing it as below.

        myObj obj;
        obj.a = 2;
        obj.b = 5;
        person.set("obj", obj);
        myObj retObj = person.get("obj").to<myObj>();
        std::cout << "a = " << retObj.a << " b = " << retObj.b << std::endl;
    

    I expected retObj = obj but the output is: a = -10368 b = 32767

    bug 
    opened by shierei 6
  • Version 2.0 of Ponder is not available anymore.

    Version 2.0 of Ponder is not available anymore.

    Dear developers,

    We were using Ponder in version 2.0 which is not available anymore on the GitHub project page. Is there a reason for removing this version? The blog states that version 2.1 is the latest. Where can I find these versions?

    Thanks in advance, Jupp

    question 
    opened by jtschea 6
  • fatal error C1001 when using arrays with Visual Studio 2015

    fatal error C1001 when using arrays with Visual Studio 2015

    If I take the code of this file : https://github.com/billyquith/ponder/blob/master/test/ponder/arrayproperty.cpp

    And I modify bool bools[2]; to bool bools[3]; And try to build using Visual Studio 2015 in x86 Debug

    I get this error :

    1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\type_traits(1443): fatal error C1001: An internal error has occurred in the compiler.
    1>  (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 255)
    1>   To work around this problem, try simplifying or changing the program near the locations listed above.
    1>  Please choose the Technical Support command on the Visual C++
    1>   Help menu, or open the Technical Support help file for more information
    

    Is there a way to use arrays larger than 2 apart from using std::array ?

    wontfix 
    opened by AntAgna 6
  • Multiple Defined Symbols

    Multiple Defined Symbols

    Hi,

    I am getting multiple defined symbol errors like so

    obj/Debug/Sandbox/Mathf.conf.o: In function ponder::runtime::ObjectFactory::construct(ponder::Args const&, void*) const: Mathf.conf.cpp:(.text+0x168): multiple definition of ponder::runtime::ObjectFactory::construct(ponder::Args const&, void*) const obj/Debug/Sandbox/Vector2.conf.o:Vector2.conf.cpp:(.text+0x1a2): first defined here

    I can successfully compile and run when I use ponder to build one of these classes (say Mathf) but as soon as I introduce another class (Vector2f) I get the above error. I understand why the error would be caused after quite a lot of digging about but I can't figure out why it is happening in this case.

    My set up is as follows:

    Mathf.h

    #pragma once
    
    class Mathf
    {
    public:
        static void Initialize();
    
        void MyFunction();
    };
    
    

    Mathf.cpp

    #include "Mathf.h"
    
    void Mathf::MyFunction()
    {
        int i = 0;
    }
    
    

    Mathf.conf.cpp

    #include "Mathf.h"
    
    #include "Core/LuaState.h"
    #include <ponder/classbuilder.hpp>
    #include <ponder/uses/lua.hpp>  
    
    PONDER_TYPE(Mathf);
    
    void Mathf::Initialize()
    {
        ponder::Class::declare<Mathf>()
    		.function("MyFunction", &Mathf::MyFunction)
    		;
    
    	ponder::lua::expose<Mathf>(LuaState::L, "Mathf");
    }
    

    Vector2f.h, Vector2f.cpp & Vector2f.conf.cpp uses the exact same set up as described above so I won't write out that code as well...

    I have tried linking to ponder both statically and dynamically and tested on Windows, Mac and Linux (Ubuntu) but I am still getting the same error.

    Any ideas why this is happening? I've been trying to overcome this issue for 3 days now but have had no luck :(

    Here is the full output from the compiler error:

    obj/Debug/Sandbox/Mathf.conf.o: In function `ponder::runtime::ObjectFactory::construct(ponder::Args const&, void*) const':
    Mathf.conf.cpp:(.text+0x168): multiple definition of `ponder::runtime::ObjectFactory::construct(ponder::Args const&, void*) const'
    obj/Debug/Sandbox/Vector2.conf.o:Vector2.conf.cpp:(.text+0x1a2): first defined here
    obj/Debug/Sandbox/Mathf.conf.o: In function `ponder::runtime::ObjectFactory::destroy(ponder::UserObject const&) const':
    Mathf.conf.cpp:(.text+0x24a): multiple definition of `ponder::runtime::ObjectFactory::destroy(ponder::UserObject const&) const'
    obj/Debug/Sandbox/Vector2.conf.o:Vector2.conf.cpp:(.text+0x284): first defined here
    obj/Debug/Sandbox/Mathf.conf.o: In function `ponder::runtime::ObjectFactory::destruct(ponder::UserObject const&) const':
    Mathf.conf.cpp:(.text+0x28e): multiple definition of `ponder::runtime::ObjectFactory::destruct(ponder::UserObject const&) const'
    obj/Debug/Sandbox/Vector2.conf.o:Vector2.conf.cpp:(.text+0x2c8): first defined here
    obj/Debug/Sandbox/Mathf.conf.o: In function `ponder::runtime::ObjectCaller::ObjectCaller(ponder::Function const&)':
    Mathf.conf.cpp:(.text+0x2d2): multiple definition of `ponder::runtime::ObjectCaller::ObjectCaller(ponder::Function const&)'
    obj/Debug/Sandbox/Vector2.conf.o:Vector2.conf.cpp:(.text+0x30c): first defined here
    obj/Debug/Sandbox/Mathf.conf.o: In function `ponder::runtime::ObjectCaller::ObjectCaller(ponder::Function const&)':
    Mathf.conf.cpp:(.text+0x2d2): multiple definition of `ponder::runtime::ObjectCaller::ObjectCaller(ponder::Function const&)'
    obj/Debug/Sandbox/Vector2.conf.o:Vector2.conf.cpp:(.text+0x30c): first defined here
    obj/Debug/Sandbox/Mathf.conf.o: In function `ponder::runtime::FunctionCaller::FunctionCaller(ponder::Function const&)':
    Mathf.conf.cpp:(.text+0x312): multiple definition of `ponder::runtime::FunctionCaller::FunctionCaller(ponder::Function const&)'
    obj/Debug/Sandbox/Vector2.conf.o:Vector2.conf.cpp:(.text+0x34c): first defined here
    obj/Debug/Sandbox/Mathf.conf.o: In function `ponder::runtime::FunctionCaller::FunctionCaller(ponder::Function const&)':
    Mathf.conf.cpp:(.text+0x312): multiple definition of `ponder::runtime::FunctionCaller::FunctionCaller(ponder::Function const&)'
    obj/Debug/Sandbox/Vector2.conf.o:Vector2.conf.cpp:(.text+0x34c): first defined here
    obj/Debug/Sandbox/Mathf.conf.o: In function `ponder_ext::pushUserObject(lua_State*, ponder::UserObject const&)':
    Mathf.conf.cpp:(.text+0x352): multiple definition of `ponder_ext::pushUserObject(lua_State*, ponder::UserObject const&)'
    obj/Debug/Sandbox/Vector2.conf.o:Vector2.conf.cpp:(.text+0x38c): first defined here
    obj/Debug/Sandbox/Mathf.conf.o: In function `ponder::lua::expose(lua_State*, ponder::Class const&, ponder::detail::basic_string_view<char, std::char_traits<char> >)':
    Mathf.conf.cpp:(.text+0x1423): multiple definition of `ponder::lua::expose(lua_State*, ponder::Class const&, ponder::detail::basic_string_view<char, std::char_traits<char> >)'
    obj/Debug/Sandbox/Vector2.conf.o:Vector2.conf.cpp:(.text+0x145d): first defined here
    obj/Debug/Sandbox/Mathf.conf.o: In function `ponder::lua::expose(lua_State*, ponder::Enum const&, ponder::detail::basic_string_view<char, std::char_traits<char> >)':
    Mathf.conf.cpp:(.text+0x168c): multiple definition of `ponder::lua::expose(lua_State*, ponder::Enum const&, ponder::detail::basic_string_view<char, std::char_traits<char> >)'
    obj/Debug/Sandbox/Vector2.conf.o:Vector2.conf.cpp:(.text+0x16c6): first defined here
    obj/Debug/Sandbox/Mathf.conf.o: In function `ponder::lua::runString(lua_State*, char const*)':
    Mathf.conf.cpp:(.text+0x17f0): multiple definition of `ponder::lua::runString(lua_State*, char const*)'
    obj/Debug/Sandbox/Vector2.conf.o:Vector2.conf.cpp:(.text+0x182a): first defined here
    collect2: error: ld returned 1 exit status
    Sandbox.make:98: recipe for target '../Bin/Debug/libSandbox.so' failed
    make[1]: *** [../Bin/Debug/libSandbox.so] Error 1
    Makefile:28: recipe for target 'Sandbox' failed
    make: *** [Sandbox] Error 2
    
    question documentation 
    opened by NickCullen 6
  • PONDER_AUTO_TYPE does not appear to work with classByName

    PONDER_AUTO_TYPE does not appear to work with classByName

    If a class, whose registration is achieved by PONDER_AUTO_TYPE, is not registered when it is referenced using classByName, then a ClassNotFound exception is thrown.

    wontfix 
    opened by iwbnwif 6
  • Serializing Ponder Objects (XML / JSON)

    Serializing Ponder Objects (XML / JSON)

    Hi, thank you for your continued efforts on this project.

    There is a subfolder include/ponder-xml but as far as I can tell these features are not included in the documentation.

    Actually, the methods serializeand deserialize (with the RapidXML compatibility layer) appear to do exactly what I need, but it would be even better if there was a RapidJSON alternative!

    Do you think it would be possible to:

    1. Include the serialization methods in the documentation.
    2. Provide a small round-trip example.
    3. Consider an enhancement to also provide a [Rapid]JSON compatibility layer.
    enhancement documentation 
    opened by iwbnwif 6
  • Fix std::logic_error not found error

    Fix std::logic_error not found error

    Compiler GCC version:gcc (GCC) 11.2.0 In this version compiler, cause std::logic_error type not found error, add header file include to fix this compile error.

    opened by lailongwei 0
  • Destroy object causes a runtime failure

    Destroy object causes a runtime failure

    Hi,

    I am trying to use ponder for reflection. I create instances of a class declared to ponder and then store the pointer to the objects in a generic datamodel.

    The code looks something like below:

    bool object_factory()
    {  
      const ponder::Class& metaClass = ponder::ClassByType<Type>();
      ponder::UserObject object = ponder::runtime::create(metaClass);
      void* ptr = object.pointer();
      if(add_to_datamodel(ptr) == FAILURE)
      {
        ponder::runtime::destroy(object);
        return FAILURE;
      }
      return SUCCESS;
    }
    

    The code builds fine and I see below runtime error when I execute unit test where the add_to_datamodel failed. The object destroy is leading to an invalid pointer.

    free(): invalid pointer
    Aborted
    

    I run google tests on ubuntu 20.04 version.

    I tried to maintain object creation and destruction similar to the library examples and it doesn't work, could you help me with the issue?

    opened by ksuryagiridhar 0
  • Use runtime error

    Use runtime error

    class Person
    {
    public:
         // constructor
        Person(const std::string& name)
            : m_name(name)
        {}
     
        // accessors for private members
        std::string name() const { return m_name; }
        void setName(const std::string& name) { m_name = name; }
     
        // public members
        float height;
        unsigned int shoeSize;
     
        // member function
        bool hasBigFeet() const { return shoeSize > 10; } // U.K.!
     
    private:
        std::string m_name;
    };
    PONDER_TYPE(Person)     // declare the type to Ponder
     
    static void declare()   // declare the class members to Ponder
    {
        ponder::Class::declare<Person>("Person")
            .constructor<std::string>()
            .property("name", &Person::name, &Person::setName)
            .property("height", &Person::height)
            .property("shoeSize", &Person::shoeSize)
            .function("hasBigFeet", &Person::hasBigFeet)
            ;
    }
    int main(){
        declare();
        const ponder::Class& metaclass = ponder::classByType<Person>();
        ponder::UserObject data = ponder::runtime::create(metaclass, "Tom");
        //auto value = data.get("m_value");
        //std::cout << value << std::endl;   
        //data.set("m_value", 1000);
        return 0;
    }
    

    I compiled the demo code but got the following error: undefined reference to `ponder::runtime::ObjectFactory::construct(ponder::Args const&, void*) const'

    opened by jackfong123 1
  • Replace exceptions with tryGet

    Replace exceptions with tryGet

    Users would prefer not to have to use exceptions (see #53). Use "tryGet" mechanism to get values instead of throwing exceptions. Exceptions are inefficient and wrapping them is tedious. Also some applications (like games) don't want to use exceptions at all.

    enhancement change 
    opened by billyquith 0
  • How to properly set nested UserObjects?

    How to properly set nested UserObjects?

    I'm upgrading my project to the latest version of ponder and in the release notes I saw "Changed UserObject reference semantics.". With this change I'm not sure how I go about setting nested user types. For example if you look at seralise.hpp ArchiveReader::read

    if (arrayProperty.elementType() == ValueKind::User) { read(item, arrayProperty.get(object, index).to<UserObject>()); } With the new semantics, doesn't that Value.to just make a copy and not actually update the object as you'd expect?

    If I'm way off and there's documentation you could point me at it would be greatly appreciated.

    Thanks

    opened by EvilPotat0 1
Releases(3.0.0)
  • 3.0.0(Oct 3, 2018)

    V1 replaced Boost with C++11. V2 added Lua bindings. V3 refactored to remove some warts, ease future development, and re-add serialisation. API is evolving.

    See release notes for more details.

    Source code(tar.gz)
    Source code(zip)
  • 2.1.1(Sep 9, 2017)

    2.1.1

    • Identifiers/names now return IdReturn (const std::string&) to improve usability.

    2.1

    • Bind Lua argument convertion directly to function. Saves Value conversion.
    • Lua custom type conversion with LuaValueRead and LuaValueWrite.
    • Lua supports enums.
    • Lua can return multiple values via std::tuple<...>.
    • Lua functions can parse table arguments.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.1(Sep 9, 2017)

  • 1.0.1(Jan 7, 2016)

  • was_camp(Jan 7, 2016)

C++ Reflection Library

!New Release - 0.9.6! RTTR C++ Reflection Library RTTR stands for Run Time Type Reflection. It describes the ability of a computer program to introspe

rttr.org 2.2k Jun 20, 2022
A miniature library for struct-field reflection in C++

visit_struct A header-only library providing structure visitors for C++11 and C++14. Motivation In C++ there is no built-in way to iterate over the me

null 347 Jun 24, 2022
Customizable C++17 Runtime Reflection Library

Refureku Check the Wiki for more documentation and use examples! Refureku is a powerful C++17 RTTI free runtime reflection library based on Kodgen. It

Julien SOYSOUVANH 164 Jun 12, 2022
A miniature library for struct-field reflection in C++

visit_struct A header-only library providing structure visitors for C++11 and C++14. Motivation In C++ there is no built-in way to iterate over the me

null 347 Jun 24, 2022
Header-only, non-intrusive and macro-free runtime reflection system in C++

Header-only runtime reflection system in C++ The reflection system was born within EnTT and is developed and enriched there. This project is designed

Michele Caini 418 Jun 21, 2022
C++ Reflection Parser / Runtime Skeleton

C++ Reflection Preface I worked on a complete reflection pipeline starting in the summer of 2015 for a game project / editor. My intent by creating th

Austin Brunkhorst 501 Jun 22, 2022
A compiling time static reflection framework for C++

static_reflect This is a fully compiling time static reflection lightweight framework for C++. It provides a very rich compile-time reflection functio

null 7 May 14, 2022
cpgf library

cpgf library cpgf library is a cross platform C++ library for callback, reflection, serialization and script binding. It's written in standard C++ and

cpgf library 205 May 28, 2022
Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum

_ _ __ _____ | \ | | / _| / ____|_ _ | \| | __ _ _ __ ___ ___ ___ | |_ | | _| |

Daniil Goncharov 1.4k Jun 20, 2022
A C++, header-only library for constructing JSON and JSON-like data formats, with JSON Pointer, JSON Patch, JSON Schema, JSONPath, JMESPath, CSV, MessagePack, CBOR, BSON, UBJSON

JSONCONS jsoncons is a C++, header-only library for constructing JSON and JSON-like data formats such as CBOR. For each supported data format, it enab

Daniel Parker 508 Jun 20, 2022
https://github.com/json-c/json-c is the official code repository for json-c. See the wiki for release tarballs for download. API docs at http://json-c.github.io/json-c/

\mainpage json-c Overview and Build Status Building on Unix Prerequisites Build commands CMake options Testing Building with vcpkg Linking to libjson-

json-c 2.5k Jul 2, 2022
C XML Minimalistic Library (CXML) - An XML library for C with a focus on simplicity and ease of use.

cxml (C XML Minimalistic Library) is a powerful and flexible XML library for C with a focus on simplicity and ease of use, coupled with features that enables quick processing of XML documents.

null 28 Feb 11, 2022
GPU Accelerated C++ User Interface, with WYSIWYG developing tools, XML supports, built-in data binding and MVVM features.

GacUI GPU Accelerated C++ User Interface, with WYSIWYG developing tools, XML supports, built-in data binding and MVVM features. Read the LICENSE first

Vczh Libraries 2.1k Jun 29, 2022
A C++ binding for the OpenGL API, generated using the gl.xml specification.

glbinding is a cross-platform C++ binding for the OpenGL API. glbinding leverages C++11 features like enum classes, lambdas, and variadic templates, i

CG Internals 727 Jun 22, 2022
The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced.

libxo libxo - A Library for Generating Text, XML, JSON, and HTML Output The libxo library allows an application to generate text, XML, JSON, and HTML

Juniper Networks 240 Jun 13, 2022
convert json/xml/bson to c++ struct

xpack 用于在C++结构体和json/xml之间互相转换, bson在xbson中支持。 只需要头文件, 无需编译库文件。 具体可以参考example的例子 基本用法 容器支持 FLAG 别名 位域 继承 枚举 自定义编解码 char数组 第三方类和结构体 格式化缩进 XML数组 Qt支持 重要

null 380 Jun 23, 2022
A lightweight, dependency-free library for binding Lua to C++

LuaBridge 2.6 LuaBridge is a lightweight and dependency-free library for mapping data, functions, and classes back and forth between C++ and Lua (a po

Vinnie Falco 1.4k Jul 1, 2022
A binding between C++11 and Lua language

lua-intf lua-intf is a binding between C++11 and Lua language, it provides three different set of API in one package: LuaBinding, Export C++ class or

Steve K. Chiu 394 Jun 26, 2022
C++ binding to Lua

bLua C++与Lua的胶水层,b代表着bridge 特性 依赖C++17 只有一个头文件 接口简单轻量 userdata的方式管理c++指针生命周期 用法 lua调用c++ 首先注册类及需要的成员函数 // 注册全局函数 bLua::reg_global_func(L, "newA", newA

null 1 Dec 28, 2021
libmagic binding for lua.

lua-libmagic libmagic binding for lua. see man libmagic for more details. Dependencies libmagic: https://github.com/file/file Installation luarocks in

Masatoshi Fukunaga 2 Jan 14, 2022
Advanced version of lutok C++/Lua binding

Lutok2 C++/Lua binding helper for Lua 5.1 and LuaJIT 2.x+. Dependencies To use Lutok2 successfully you'll need: A standards-compliant C++11 complier L

Mário Kašuba 8 Jan 17, 2020
C++ binding to Lua

Kaguya C++ binding to Lua Licensed under Boost Software License Requirements Lua 5.1 to 5.3 (recommended: 5.3) C++03 compiler with boost library or C+

null 307 Jun 28, 2022
A Sol-inspired minimalist Lua binding for Zig.

zoltan A Sol-inspired minimalist Lua binding for Zig. Features Supports Zig 0.9.0 Lua tables table creation from Zig get/set/create methods possible k

null 66 Jun 20, 2022
lua binding for Software implementation in C of the FIPS 198 Keyed-Hash Message Authentication Code HMAC

lua-hmac Compute the SHA-224, SHA-256, SHA-384, and SHA-512 message digests and the Hash-based Message Authentication Code (HMAC). this module is Lua

Masatoshi Fukunaga 3 Mar 22, 2022
lua-nuspell is a set of Lua 5.x bindings for Nuspell spellchecking C++ library.

lua-nuspell lua-nuspell is a set of Lua 5.x bindings for Nuspell spellchecking C++ library. About Nuspell Nuspell is a fast and safe spelling checker

AF 7 Mar 7, 2022
LAppS - Lua Application Server for micro-services with default communication over WebSockets. The fastest and most vertically scalable WebSockets server implementation ever. Low latency C++ <-> Lua stack roundtrip.

LAppS - Lua Application Server This is an attempt to provide very easy to use Lua Application Server working over WebSockets protocol (RFC 6455). LApp

null 47 Apr 25, 2022
A dependency free, embeddable debugger for Lua in a single file (.lua or .c)

debugger.lua A simple, embedabble debugger for Lua 5.x, and LuaJIT 2.x. debugger.lua is a simple, single file, pure Lua debugger that is easy to integ

Scott Lembcke 571 Jun 28, 2022
The Lua development repository, as seen by the Lua team. Mirrored irregularly

The Lua development repository, as seen by the Lua team. Mirrored irregularly

Lua 5.7k Jun 23, 2022