'knows-a' and 'has-a' in OpenSees

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
yaqiang.jiang
Posts: 25
Joined: Mon Sep 21, 2009 1:59 am
Location: UoE

'knows-a' and 'has-a' in OpenSees

Post by yaqiang.jiang »

Dear Frank and all,

I know the above relationships have different semantic meanings; however I can't find obvious differences in the implementation with C++. Take the Analysis object for instance, it knows a Domain object and has an AnalysisModel object, an Integrator object, etc. But in Analysis class, both the Domain object and other subordinate objects appear in pointer form. I just got confused......
Any of your comments will be appreciated.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

there are no has-a and knows-a constructs in c++ .. all there is are pointers .. implementation and design have to be seperated.
Post Reply