In a source library written in D, is it possible to have some
objects, variables, pointers etc which are determined by the
program using the library?
An example of where this would be useful is in the library I am
currently writing. I have a class called `Map`, which holds an
array of objects of the `Tile` class. A program using my library
can inherit the Map class if they want to add more functions and
variables, but what if they want to add more to the Tile class?
Even if they make a derived class of `Tile`, they can't override
the use of the base Tile class in the Map class.
In cases like this, it would be useful to allow the client
program to determine the type for some objects. For it to work
with types defined in the client software code, the client
software will also need a way to give it access to a module of
the client software.
I know that D has something called compile-time function
evaluation, but I don't know the full capabilities.
- Can a D library ... Liam McGillivray via Digitalmars-d-learn
- Re: Can a D... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
- Re: Can... Liam McGillivray via Digitalmars-d-learn
- Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
- ... Liam McGillivray via Digitalmars-d-learn
- ... cc via Digitalmars-d-learn
- ... Liam McGillivray via Digitalmars-d-learn
- ... Liam McGillivray via Digitalmars-d-learn
- ... Liam McGillivray via Digitalmars-d-learn
- ... Liam McGillivray via Digitalmars-d-learn
- ... cc via Digitalmars-d-learn