return line.substr(i+1);
}
+string cut_namespaces(string line, int ortho) /** Cut namespaces ORTHOGONAL STATES. */
+{
+ int i;
+ int brackets = 0;
+ for(i = line.length()-1;i>0;i--)
+ {
+ if(line[i]=='<') brackets+=1;
+ if(line[i]=='>') brackets-=1;
+ if(line[i]==':' && line[i-1]==':')
+ {
+ if(brackets == 0) break;
+ else i--;
+ }
+ }
+ if(i==0) return line;
+ return line.substr(0,i-1);
+}
+
bool is_derived(const string line) /** Test whether this struct or class is derived */
{
unsigned i;
string get_params(string line) /** Return parameters of the specified transition */
{
int pos_front = line.find("<")+1;
- int pos_end = line.find(">");
+ int pos_end = line.rfind(">");
return line.substr(pos_front,pos_end-pos_front);
}