[Uml-devel] C++ class import bugfix
    Tsuraan 
    grovenjl at rose-hulman.edu
       
    Wed Dec  4 09:22:02 UTC 2002
    
    
  
In the current CVS version of umbrello, the c++ parser is a little bit broken: 
it ignores overloaded operator().  The fix for this is pretty simple; it just 
requires adding a couple of lines to CClassParser::parseMethodDeclaration().  
The change looks like this:
Where it said 
  while( lexem != '(' && lexem != ';' && lexem != 0 )
  {
    if (lexem==CPOPERATOR) 
      isOperator=true;
    PUSH_LEXEM();
    getNextLexem();
  }
make it instead say
  while( lexem != '(' && lexem != ';' && lexem != 0 )
  {
    if (lexem==CPOPERATOR) {
      isOperator=true;
      PUSH_LEXEM();
      getNextLexem();
    }
    PUSH_LEXEM();
    getNextLexem();
  }
That way, it will always grab whatever comes after the operator keyword.  
Otherwise, it will see the '(' and exit the loop, which causes it to ignore 
operator().  Could someone with CVS commit privileges please fix this?
--jay
    
    
More information about the umbrello-devel
mailing list