AEConvert: Use a more extensible API. #1295

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

aballier commented Aug 17, 2012

New API is: create a CAE{Fr,To}FloatConv class foo.
The class is to be considered valid iff foo->is_valid is true.
Call foo->convert to make the conversion.
delete foo when done.

This follows from the discussion on #1290.
With this new API, it should be easy to implement AEConvert stuff based on swr/avr.

How to do this is still to decide:

  1. a new .cpp file for the swr based converter, implementing the same classes, and chose at build time which file to build
  2. #ifdefery in the current AEConvert.cpp

Anyway, a new converter depends on #1290 to be merged first.

Member

gnif commented Aug 17, 2012

I dont like the access to 'is_valid', it should be private and a get function be written as this is read only outside of the class.

@aballier aballier AEConvert: Use a more extensible API.
New API is: create a CAE{Fr,To}FloatConv class foo.
The class is to be considered valid iff foo->is_valid is true.
Call foo->convert to make the conversion.
delete foo when done.
159989e
Contributor

aballier commented Aug 17, 2012

re is_valid: Changed to a function, it makes more sense here.
usually i'm not a fan of this OO religion of babysitting developers by duplicating the code using getters/setters, but in this case it just makes more sense for it to be a function, and allows more flexibility for implementations.

Contributor

aballier commented Jul 27, 2013

this pr is seriously superseeded by activeae

aballier closed this Jul 27, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment