Now builds all functions except those dependent on Features2d. Improved build detection if cmake is rerun

This commit is contained in:
hbristow
2013-06-27 16:25:18 -07:00
parent 245bc5dcc0
commit d6453cf051
5 changed files with 25 additions and 6 deletions

View File

@@ -51,6 +51,13 @@ class Translator(object):
# classes have 'class' prefixed on their name
if 'class' in defn[0].split(' ') or 'struct' in defn[0].split(' '):
return self.translateClass(defn)
# --- operators! ---
#TODO: implement operators: http://www.mathworks.com.au/help/matlab/matlab_oop/implementing-operators-for-your-class.html
if 'operator' in defn[0]:
return self.translateFunction(defn)
# --- constant ---
elif convertibleToInt(defn[1]):
return self.translateConstant(defn)
# --- function ---
# functions either need to have input arguments, or not uppercase names
elif defn[3] or not self.translateName(defn[0]).split('_')[0].isupper():