aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2013-10-28 17:31:40 +0200
committerYakov Goldberg <yakov.g@samsung.com>2013-10-28 17:31:40 +0200
commitd8138d95e355be82e7f9ca61c617b2fc50c9b6ae (patch)
tree2fb75d393b583222e47a3ebbf2e71420a6594327
parentremove * from OUT parameter in property (diff)
downloadeo_bindings-d8138d95e355be82e7f9ca61c617b2fc50c9b6ae.tar.gz
remove _get/_set from all properties; remove * from out params
-rw-r--r--eoparser/cparser.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/eoparser/cparser.py b/eoparser/cparser.py
index 47b4899..51896c2 100644
--- a/eoparser/cparser.py
+++ b/eoparser/cparser.py
@@ -911,7 +911,12 @@ class Cparser(object):
for (n, m ,t1, d, c) in cl_data[const.FUNCS][prefix+"_set"][const.PARAMETERS]:
if d != "in":
T = const.METHOD
- cl_data[T].append(itr_name)
+
+ if (T == const.SET_ONLY):
+ cl_data[T].append(prefix)
+ else:
+ cl_data[T].append(prefix + "_set")
+
func_name_list_not_visited.remove(itr_name)
elif prefix + "_get" in func_name_list_not_visited:
@@ -919,7 +924,12 @@ class Cparser(object):
for (n, m ,t1, d, c) in cl_data[const.FUNCS][prefix+"_get"][const.PARAMETERS]:
if d != "out":
T = const.METHOD
- cl_data[T].append(itr_name)
+
+ if (T == const.GET_ONLY):
+ cl_data[T].append(prefix)
+ else:
+ cl_data[T].append(prefix + "_get")
+
func_name_list_not_visited.remove(itr_name)
else:
@@ -949,7 +959,7 @@ class Cparser(object):
#properties_set
for name in cl_data[const.SET_ONLY]:
f_ret = ret[PROPERTIES][name] = OrderedDict()
- f = cl_data[const.FUNCS][name]
+ f = cl_data[const.FUNCS][name + "_set"]
f_ret["comment"] = f[const.COMMENT]
f_ret["type"] = "wo"
par_arr = f_ret["parameters"] = []
@@ -959,7 +969,7 @@ class Cparser(object):
#properties_get
for name in cl_data[const.GET_ONLY]:
f_ret = ret[PROPERTIES][name] = OrderedDict()
- f = cl_data[const.FUNCS][name]
+ f = cl_data[const.FUNCS][name + "_get"]
f_ret["comment"] = f[const.COMMENT]
f_ret["type"] = "ro"
par_arr = f_ret["parameters"] = []
@@ -977,6 +987,9 @@ class Cparser(object):
ret[METHODS][name]["comment"] = f[const.COMMENT]
par_arr = ret[METHODS][name]["parameters"] = []
for (n, m ,t1, d, c) in f[const.PARAMETERS]:
+ if d == "out":
+ p = t1.find("*")
+ t1 = t1[:p] + t1[p + 1:]
par_arr.append((d, m, t1, n, c))
(h, t) = os.path.split(cl_data[const.XML_FILE])