Das is a compile time model generation system.
Das is part of the Elle set of libraries.
The less code you write, the happier you should be is the philosophy behind Das.
See Elle: How to compile.
./drake //src/elle/das/build -j 2
ELLE_DAS_SYMBOL(title);
ELLE_DAS_SYMBOL(artist);
/// Declare a Record class with a title and an artist.
struct Record
{
std::string title;
std::string artist;
using Model = elle::das::Model<Record, elle::meta::List<Symbol_title, Symbol_artist>>;
};
// ...
Record record{"Sandstorm", "Darude"};
// Default printer.
std::cout << record << std::endl; // Record(title = Sandstorm, artist = Darude)
// Default serialization.
elle::serialization::json::SerializerOut serializer(std::cout, false);
elle::das::serialize(record, serializer); // {"title": "Sandstorm", "artist": "Darude"}
- Website: https://infinit.sh/open-source
- Email: open+elle@infinit.sh