git-svn-id: svn://db.shs.com.ru/pip@230 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2016-08-19 12:21:34 +00:00
parent 5ab1ec1543
commit 6d7a7d3eb1
4 changed files with 46 additions and 6 deletions

View File

@@ -60,6 +60,11 @@ PIMutex PIObject::__eh_mutex;
PIMap<PIString, PIObject::__EHData> PIObject::__eh_data;
PIString PIObject::__EHFunc::arguments() const {
return types.join(",");
}
PIString PIObject::__EHFunc::fullFormat() const {
PIString ret = type_ret + " " + scope + "::" + func_name +"(";
for (int i = 0; i < types.size_s(); ++i) {
@@ -347,6 +352,34 @@ void PIObject::updateConnectors() {
}
PIString PIObject::simplifyType(const char * a) {
PIString ret = PIStringAscii(a).trim();
int white = -1;
for (int i = 0; i < ret.size_s(); ++i) {
bool iw = ret[i] == ' ' || ret[i] == '\t' || ret[i] == '\r' || ret[i] == '\n';
//piCout << i << iw << white;
if (white < 0) {
if (iw) {
white = i;
continue;
}
} else {
if (!iw) {
ret.replace(white, i - white, " ");
i = white;
white = -1;
//piCout << i;
}
}
}
ret.replaceAll(" &", "&");
ret.replaceAll(" *", "*");
if (ret.startsWith("const ") && ret.endsWith("&"))
ret.cutLeft(6).cutRight(1).trim();
return ret;
}
bool PIObject::execute(const PIString & method) {
if (method.isEmpty()) return false;
PIVector<__EHFunc> ml = findEH(method);