ogx / Calculation2D

Extensible 2D image processing framework for C++
3 stars 0 forks source link

BindInputParam enum #96

Closed carasuca closed 12 years ago

carasuca commented 12 years ago

yet another enum mapping problem:

plugin\mmcalcmethod.h(146): error C2664: 'mmImages::BindParam' : cannot convert parameter 3 from 'const mmXML::mmXMLDataType' to 'const mmImages::mmGenericParamI::mmType'

-1 for in-header implementation -1 for functor object :)

themoob commented 12 years ago

Sorry, one place missed. Corrected.

carasuca commented 12 years ago

@themoob why different enums for xml and generic param? can't xml params be extended so generic param can reuse xml?

malleor commented 12 years ago

@carasuca You'd need to be more elaborate about this. Maybe we should talk it over in person some day.

Generally, we were trying to be backward-compatible with already written plugins and this is why we left those xml param constants there. I personally hate them, so I made my simple, lowercase param types and use it for json all around, but needed to make a two-way converter on exe boundaries.

Hope we're gonna switch to my string constants rather than these monster bloated freakin-ellipsis-ended goddamn-xml param definitions. Yeah, I dislike them. Actually, when we're on it, we should switch to json. The developer is already abstracted from composing xml :)

malleor commented 12 years ago

Oh, you meant enums, not strings...

carasuca commented 12 years ago

json is the way to go. the question is when?

malleor commented 12 years ago

I'd leave it till at least 2.0. Time to cool stuff down and still serious features to implement...

themoob commented 12 years ago

why different enums for xml and generic param? can't xml params be extended so generic param can reuse xml?

Because XMLIOUtilities is queued for removal. As you said, XML will be changed to JSON or some other thing one day, so it would be pointless to keep this mmXML::mmXMLDataType enum.

carasuca commented 12 years ago

OK, this is good. The user doesn't have to be aware of XML tags.