GithubHelp home page GithubHelp logo

Comments (1)

marzer avatar marzer commented on May 18, 2024

Oh, fun! I implemented pretty much exactly this in poxy without realizing you had this on the roadmap. Thought you might like a bit of an 'implementation experience' summary to serve as an example (or even just to see how it actually looks to help you make decisions re styling).

I went the magic macro route:

  • Users put POXY_IMPLEMENTATION_DETAIL() in their code around features they want to hide
  • Doxygen replaces that with just POXY_IMPLEMENTATION_DETAIL_IMPL (i.e. as if #define POXY_IMPLEMENTATION_DETAIL(...) POXY_IMPLEMENTATION_DETAIL_IMPL)
  • Poxy's HTML post-process replaces all instances POXY_IMPLEMENTATION_DETAIL_IMPL with a C-style block comment /* ... */

Which looks like this: example

It'd be relatively simple to extend that approach to allow for user-defined macros and such. You'd obviously have much more power to do fun stuff here as part of the html generation step, rather than my kludgy post-process.

figure out a way how to make this builtin (provide a header with such definitions so the user can just #include <mcss.h>?

My relatively dumb way of solving this problem is to drag this snippet from project to project:

#if !defined(__POXY__) && !defined(POXY_IMPLEMENTATION_DETAIL)
	#define POXY_IMPLEMENTATION_DETAIL(...) __VA_ARGS__
#endif

Which doesn't require a separate header, of course, but is still invasive all the same. I guess the overhead is realtively low for any project with a single central preprocessor.h, or core.h or similar (which most will have), so either solution is going to be fine for most.

from m.css.

Related Issues (20)

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.