[aspect-devel] Kludges in ASPECT

Jonathan Perry-Houts jperryh2 at uoregon.edu
Fri Oct 31 15:36:21 PDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On 10/31/2014 02:56 PM, Wolfgang Bangerth wrote:
> I'd just make all of the members of Simulator public. Basically 
> everything you do in plugins is in classes that derive from 
> SimulatorAccess, so if you do 
> const_cast<Simulator<dim>&>(this->get_simulator()) then you have a
> writable reference to the simulator object and you can access all
> of its member variables (because you've made them public).
> 
> Not pretty, but works.
> 
> Best W.
> 
> 

That's awesome. I know it's object-oriented blasphemy, but it's super
useful. Thanks!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJUVA7jAAoJEGe6xJ1FYRpR1gMIAMHfRuf5s7+kQhihFCIOerne
n/3KktWJ9Y/OXye4K2KbL7i94c55MkK4xPPBEDZozMWiKZ03UHMtUbVbDp81LE5j
ZXUBsl/DcmxHxoU2x3N+1y0BfBeUI1lexr/Q1TJrNaV64jWL4QKSBt1N7e8Vc2ob
IT+CSnSdQWzqC+wEOcBbpu+hcldwf1Mhot8RfZO6yseYtDlIndJkT84ZTm3m6PMT
i46ZQFnIgnVQQx4WG74aTDR7m9WG5J0/qEktzdz6hFG7G2L+B3pzO6pRRcQa4wjT
HOsLdk3nul8Xm/p/fDAJRv2J1t5oL/4hhZqMTjKZjwqFzkUIpBRGSCtcsBVbwfo=
=Tp92
-----END PGP SIGNATURE-----


More information about the Aspect-devel mailing list