Re: How to encript header files.
From: Siemel Naran (SiemelNaran_at_REMOVE.att.net)
Date: Wed, 30 Mar 2005 09:45:59 GMT
<firstname.lastname@example.org> wrote in message
> Well I have a suggestion. Why don't you define an class with only pure
> virtual functions (Lets call it interfaceA for simplicity sake). Now in
> this class place all the function you would like to export and make
> sure that they are pure virtual. Now change the header file that you
> currently have (the one which you do not want to send to your client)
> and derive the class in this header from interfaceA. Now this way you
> need not send your header file to your client since all your client
> needs to see is the header containing interfaceA. Also the amount of
> code you need to change is minimal. Hope this helps
But that would make the functions non-inline, which seems to be what the OP
wants to avoid (inline for performance reasons I guess). However, if the
functions are complex enough that exposing them exposes the implementation
details of your algorithms, then I guess they're probably non-trivial
functions and should not be inline anyway. Therefore I like this
suggestion, though it does not have to be an abstract base class with pure
virtual functions, but rather any class with non-inline functions.
Also, off topic but worth mentioning: if the algorithms are that complex,
then consider getting patents on them.