Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BioFVM namespace usage #82

Open
eOnofri04 opened this issue Apr 12, 2022 · 4 comments
Open

BioFVM namespace usage #82

eOnofri04 opened this issue Apr 12, 2022 · 4 comments

Comments

@eOnofri04
Copy link

Hi,

I am developing some simulations building upon PhysiCell.

I might be wrong with the import procedure of the sources, however, including PhysiCell header files forces me to include BioFVM namespace even when PhysiCell's is not included.
It is in fact the case from three .h files, e.g. PhysiCell_cell.h that is usually imported via `#include "./core/PhysiCell.h".

In my personal fork, I have solved this issue by moving such usings inside PhysiCell's namespace (actually two lines down in a bunch of files).

I think that could also be your initial idea since in the Documentation you suggest here to include PhysiCell's and BioFVM's namespaces.

Best,
Elia

@MathCancer
Copy link
Owner

Thank you.

Yes, this reflects prior history when the projects were more independent.

We could make this fix, but is anything broken in its current state of two namespaces?

(Sorry for the naive question: I'm trying to understand the implications of the problem, as it has not caused us any issues to date across platforms and projects.)

@eOnofri04
Copy link
Author

Your question makes totally sense.

The namespace import problem will rarely cause effective problems in implementation rather than (possibly) having some naming conflict. The actual effect is simply that things are "visible"/callable even when they should be not (like everything is global).
However, since we are trying to develop a module that uses PhysiCell by wrapping it, it totally makes sense that importing such a module would not allow to directly modify internal values in, say, BioFVM.

Thanks again for your work,
Best,
Elia

@MathCancer
Copy link
Owner

Thanks!

Hmm, I'll take another look. Thank you for the helpful explanation.

Since PhysiCell builds off of / extends BioFVM, it can't be used without things in the BioFVM namespace. (They could with a lot of careful cleanup, but in practice they are so intertwined that it makes sense for them to be in the same namespace.)

So, I think pulling the "using" into the PhysiCell namespace makes tremendous sense. I'm going to put this on my testing radar for the next release (I'd want ot put it into 1.11.1, after we get 1.11.0 out the door today or tomorrow.)

Thank you! And I'm super intrigued at the wrapper you're working on!!

@drbergman
Copy link
Collaborator

time to close?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants