-
-/*
-void wxMethod::SetFromString(const wxString& proto)
-{
- m_strProto=proto.Strip(wxString::both);
-
- // make sure there is a space separing each token
- m_strProto.Replace("&", "& ");
- m_strProto.Replace("*", "* ");
- m_strProto.Replace(",", ", ");
-
- wxASSERT(m_strProto.Contains("::"));
- wxASSERT(m_strProto.Contains("(") && m_strProto.Contains(")"));
-}
-
-wxType wxMethod::GetReturnType() const
-{
- wxString leftpart = m_strProto.Left(m_strProto.Find("::")).Strip(wxString::both);
- if (!leftpart.Contains(" "))
- // this is a dtor or a ctor then...
- return wxEmptyType;
-
- // see SetFromString: all tokens are separed by a space!
- wxType ret(leftpart.BeforeFirst(' ').Strip(wxString::both));
- wxASSERT(ret.IsOk());
-
- return ret;
-}
-
-wxString wxMethod::GetName() const
-{
- int nstart = m_strProto.Find("::")+2,
- nend = m_strProto.Find("(");
- wxASSERT(nstart!=wxNOT_FOUND && nend!=wxNOT_FOUND);
-
- return m_strProto.Mid(nstart, nend-nstart).Strip(wxString::both);
-}
-
-bool wxMethod::IsConst() const
-{
- return m_strProto.EndsWith("const");
-}
-
-bool wxMethod::IsStatic() const
-{
- return m_strProto.StartsWith("static");
-}
-
-wxTypeArray wxMethod::GetArgumentTypes() const
-{
- int nstart = m_strProto.Find('(', false * start from beginning *)+1,
- nend = m_strProto.Find(')', true * start from end *);
- wxASSERT(nstart!=wxNOT_FOUND && nend!=wxNOT_FOUND);
-
- wxString argstr = m_strProto.Mid(nstart, nend-nstart).Strip(wxString::both);
- wxArrayString args = wxSplit(argstr, ',');
-
- wxTypeArray ret;
- for (unsigned int i=0; i<args.GetCount(); i++)
- {
- wxString arg = args[i].Strip(wxString::both);
-
- // arg may contain both the type and the argument name;
- // we need to get rid of the last one...
- wxArrayString temp = wxSplit(arg, ' ');
-
- if (temp.GetCount()>1 &&
- !temp.Last().Contains("&") &&
- !temp.Last().Contains("*") &&
- g_)
- arg.Replace(temp.Last(), ""); // looks like an argument name - remove it
-
- ret.Add(wxType(arg));
- }
-
- return ret;
-}
-*/