How about including a small amount of example code in a large framework?

I am about to upload a fairly large project of mine, a very flexible component-entity-system. More precisely it's a framework for a CES. It consists of 22 files, ~1000 lines of code and 20000 characters.

My problem is that in order to demonstrate what the framework does, I have 2 base component types (input, graphics) and 2 types of entities included in the framework. This is basically example code, unlike the framework itself. The base components have empty implementation too. However if I omitted these "examples" the usage and usefulness of the framework would be rather inconvenient to figure out. So I have empty implementation of base components and components specific to the particular entities (deriving from base components), because these classes' pure existence gives meaning to the framework's capabilities. Although having this kind of empty implementation is pretty much like having pseudo-code (even if everything compiles) and these tiny segments of code are not open to being reviewed therefore.

As an example here is an example component of an entity, where InputComp<> is the abstract base class for all InputComp< 'entity name' > classes.

template<>
class Comp<CompBase::INPUT, void> : public CompBase
{
// Abstract Input component implementation.
};
template<typename Ent_t = void>
using InputComp = Comp<CompBase::INPUT, Ent_t>;

// in another part of the code
template<>
class InputComp<Monkey> : public InputComp<>
{
// Monkey specific Input component implementation.
};


So is it okay to have a small amount of example-like code breathing life into a framework, included in the framework, given proper labeling of these segments.

• We don't often say something is too big to review, but uploading your entire framework as a whole will not work in your favour. Why don't you select specific parts of your framework instead?
– Mast Mod
Nov 30, 2015 at 10:21
• It only makes sense to interpret it holistically, I think. It is written rather cleanly and it is indeed really flexible so I'm sure you will like it :P Nov 30, 2015 at 10:29
• Prefer readability over brevity. InputComp -> InputComponent, CompBase -> ComponentBase, Comp -> Component (possible name collision..) You see, you can even get feed-back here :) Dec 14, 2015 at 7:34