rmpowell77 / LIAW_2017_param

Library In A Week 2017 Parameter
MIT License
19 stars 5 forks source link

argo for constructors #6

Open ambmax00 opened 4 years ago

ambmax00 commented 4 years ago

Hi, I would like to ask, if it possible to use argo for class constructors? I know boost parameter has some work-around for it, but I'm not so sure how to do it for argo. I am trying to write a wrapper class for an interface to Fortran. For example, I have an object called pgrid, which in Fortran is created by CALL dbcsr_t_pgrid_create(fcomm, dims, pgrid, map1_2d, map2_2d, nsplit, dimsplit) and most arguments are optional, so I would ideally like to write a nice constructor for a class pgrid with named parameters.

atomgalaxy commented 4 years ago

I don't see why not but I'd have to think about it.

You should just make the constructor the facade function and then everything should just work...

I'll give it a think over the weekend

On Fri, Nov 29, 2019, 10:47 Maximilien Ambroise notifications@github.com wrote:

Hi, I would like to ask, if it possible to use argo for class constructors? I know boost parameter has some work-around for it, but I'm not so sure how to do it for argo. I am trying to write a wrapper class for an interface to Fortran. For example, I have an object called pgrid, which in Fortran is created by CALL dbcsr_t_pgrid_create(fcomm, dims, pgrid, map1_2d, map2_2d, nsplit, dimsplit) and most arguments are optional, so I would ideally like to write a nice constructor for a class pgrid with named parameters.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rmpowell77/LIAW_2017_param/issues/6?email_source=notifications&email_token=AAA5R5J6RRTDHHG7HGEPMRLQWDXKHA5CNFSM4JS56WZKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H43NRJQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA5R5J3QY2VR67WG3A3W2TQWDXKHANCNFSM4JS56WZA .