Changeset aa86123 in tol
- Timestamp:
- Jun 7, 2011, 9:09:33 AM (15 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- c00e3a5
- Parents:
- 21a0cae
- Location:
- tol/btol/bgrammar
- Files:
-
- 3 edited
-
class.cpp (modified) (3 diffs)
-
spfuninst.cpp (modified) (1 diff)
-
tol_bclass.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/bgrammar/class.cpp
r21a0cae raa86123 503 503 504 504 //-------------------------------------------------------------------- 505 void BMember::PutDescription(const BText& desc) 506 //-------------------------------------------------------------------- 507 { 508 //if(desc=="Devuelve el valor de @C::_.A") 509 // printf(""); 510 BSyntaxObject* obj = NULL; 511 description_ = desc; 512 if(method_) { obj = method_; } 513 else if(static_) { obj = static_; } 514 if(obj) 515 { 516 obj->PutDescription(desc); 517 } 518 } 519 520 //-------------------------------------------------------------------- 505 521 BMemberOwner::BMemberOwner() 506 522 //-------------------------------------------------------------------- … … 1567 1583 BClass* parent = (BClass*)mbr->parent_; 1568 1584 BClass* firstParent = (BClass*)mbr->firstParent_; 1569 if(!parent || !firstParent) { return(false); } 1585 if(!parent || !firstParent) 1586 { 1587 if(mbr->description_.HasName() && mbr->description_!=desc) 1588 { 1589 return(false); 1590 } 1591 else 1592 { 1593 mbr->PutDescription(desc); 1594 return(true); 1595 } 1596 } 1570 1597 if(( mbr->method_ && (parent ==this)) || 1571 1598 (!mbr->method_ && (firstParent==mbr->parent_)) ) 1572 1599 { 1573 mbr->description_ = desc; 1574 if(mbr->method_) { obj = mbr->method_; } 1575 else if(mbr->static_) { obj = mbr->static_; } 1576 if(obj) 1577 { 1578 obj->PutDescription(desc); 1579 } 1600 mbr->PutDescription(desc); 1580 1601 } 1581 1602 else 1582 1603 { 1583 if(!mbr->method_)1584 {1585 mbr->description_ = firstParent->FindMember(name)->description_;1586 }1587 else1588 {1589 mbr->description_ = desc;1590 }1591 ok = false;1592 1604 if(mbr->method_) 1593 1605 { 1606 ok = false; 1594 1607 Warning(I2("Cannot change description of non overloaded method ", 1595 1608 "No se puede cambiar la descripción de un método no sobrecargado ")+ … … 1600 1613 else 1601 1614 { 1615 BMember* inherited = firstParent->FindMember(name); 1616 ok = false; 1617 if(!inherited) 1618 { 1619 Warning(I2("Cannot find attribute ", 1620 "No se encuentra el atributo ")+ 1621 getFullNameRef()+"::"+name+ 1622 I2(" inherited from "," heredado de ")+ 1623 firstParent->getFullNameRef()+"::"+name); 1624 } 1625 else 1626 { 1627 mbr->PutDescription(inherited->description_); 1628 } 1602 1629 Warning(I2("Cannot change description of non method member ", 1603 "No se puede cambiar la descripción de un miembro que no es un método")+1630 "No se puede cambiar la descripción de un atrib ")+ 1604 1631 getFullNameRef()+"::"+name+ 1605 1632 I2(" originally inherited from "," heredado originalmente de ")+ -
tol/btol/bgrammar/spfuninst.cpp
r21a0cae raa86123 1031 1031 else if(!obj) 1032 1032 { 1033 obj = gra->LeftEvaluateExpr(tokenName); 1033 obj = FindStruct(tokenName); 1034 if(!obj) { obj = gra->LeftEvaluateExpr(tokenName); } 1034 1035 } 1035 1036 } -
tol/btol/bgrammar/tol_bclass.h
r21a0cae raa86123 102 102 int BuildMethod(); 103 103 int BuildStatic(); 104 BText Dump() const;105 104 BText Dump () const; 105 void PutDescription(const BText& desc); 106 106 DeclareClassNewDelete(BMember); 107 107 };
Note: See TracChangeset
for help on using the changeset viewer.
