[Uml-devel] KDE/kdesdk/umbrello/umbrello
Sharan Rao
sharanrao at gmail.com
Fri Jul 6 10:26:23 UTC 2007
SVN commit 684179 by sharan:
making getters and other similar functions `const`
M +1 -1 checkconstraint.h
M +6 -6 classifier.cpp
M +8 -8 classifier.h
M +2 -2 classifierlistitem.cpp
M +2 -2 classifierlistitem.h
M +0 -14 codegenerationpolicy.h
M +4 -4 entity.cpp
M +5 -5 entity.h
M +6 -6 entityattribute.cpp
M +6 -5 entityattribute.h
M +1 -1 foreignkeyconstraint.cpp
M +4 -4 foreignkeyconstraint.h
M +0 -1 uml.cpp
M +1 -1 uniqueconstraint.h
--- trunk/KDE/kdesdk/umbrello/umbrello/checkconstraint.h #684178:684179
@@ -89,7 +89,7 @@
/**
* Returns a string represention of the condition that this constraint is checking
*/
- QString getCheckCondition() {
+ QString getCheckCondition() const {
return m_CheckCondition;
}
--- trunk/KDE/kdesdk/umbrello/umbrello/classifier.cpp #684178:684179
@@ -315,7 +315,7 @@
return atts.count();
}
-UMLAttributeList UMLClassifier::getAttributeList() {
+UMLAttributeList UMLClassifier::getAttributeList() const{
UMLAttributeList attributeList;
for (UMLObjectListIt lit(m_List); lit.current(); ++lit) {
UMLObject *listItem = lit.current();
@@ -607,7 +607,7 @@
m_pClassAssoc = assoc;
}
-UMLAssociation *UMLClassifier::getClassAssoc() {
+UMLAssociation *UMLClassifier::getClassAssoc() const{
return m_pClassAssoc;
}
@@ -656,7 +656,7 @@
return ops;
}
-UMLClassifierListItemList UMLClassifier::getFilteredList(Uml::Object_Type ot) {
+UMLClassifierListItemList UMLClassifier::getFilteredList(Uml::Object_Type ot) const {
UMLClassifierListItemList resultList;
UMLObject *o;
for (UMLObjectListIt lit(m_List); (o = lit.current()) != NULL; ++lit) {
@@ -743,7 +743,7 @@
return tempList.count();
}
-UMLTemplateList UMLClassifier::getTemplateList() {
+UMLTemplateList UMLClassifier::getTemplateList() const {
UMLTemplateList templateList;
for (UMLObjectListIt lit(m_List); lit.current(); ++lit) {
UMLObject *listItem = lit.current();
@@ -827,7 +827,7 @@
m_pSecondary = origType;
}
-UMLClassifier * UMLClassifier::originType() {
+UMLClassifier * UMLClassifier::originType() const{
return static_cast<UMLClassifier*>(m_pSecondary);
}
@@ -835,7 +835,7 @@
m_isRef = isRef;
}
-bool UMLClassifier::isReference() {
+bool UMLClassifier::isReference() const{
return m_isRef;
}
--- trunk/KDE/kdesdk/umbrello/umbrello/classifier.h #684178:684179
@@ -133,7 +133,7 @@
*
* @return The number of attributes for the class.
*/
- int attributes();
+ int attributes() ;
/**
* Returns the attributes.
@@ -142,7 +142,7 @@
*
* @return List of true attributes for the class.
*/
- UMLAttributeList getAttributeList();
+ UMLAttributeList getAttributeList() const;
/**
* Creates an operation in the current document.
@@ -224,7 +224,7 @@
*
* @return The number of operations for the Classifier.
*/
- int operations();
+ int operations() ;
/**
* Return a list of operations for the Classifier.
@@ -301,7 +301,7 @@
*
* @return Pointer to the list of true templates for the class.
*/
- UMLTemplateList getTemplateList();
+ UMLTemplateList getTemplateList() const;
/**
* Take and return a subordinate item from this classifier.
@@ -320,7 +320,7 @@
*
* @return The list of true operations for the Concept.
*/
- virtual UMLClassifierListItemList getFilteredList(Uml::Object_Type ot);
+ virtual UMLClassifierListItemList getFilteredList(Uml::Object_Type ot) const;
/**
* Needs to be called after all UML objects are loaded from file.
@@ -390,7 +390,7 @@
* association class. Returns NULL if this class does not act
* as an association class.
*/
- UMLAssociation *getClassAssoc();
+ UMLAssociation *getClassAssoc() const;
/**
* Reimplementation of method from class UMLObject for controlling the
@@ -416,7 +416,7 @@
/**
* Get the origin type (in case of e.g. typedef)
*/
- UMLClassifier * originType();
+ UMLClassifier * originType() const;
/**
* Set the m_isRef flag (true when dealing with a pointer type)
@@ -426,7 +426,7 @@
/**
* Get the m_isRef flag.
*/
- bool isReference();
+ bool isReference() const;
/**
* Return true if this classifier has abstract operations.
--- trunk/KDE/kdesdk/umbrello/umbrello/classifierlistitem.cpp #684178:684179
@@ -53,11 +53,11 @@
return getName();
}
-UMLClassifier * UMLClassifierListItem::getType() {
+UMLClassifier * UMLClassifierListItem::getType() const{
return static_cast<UMLClassifier*>(m_pSecondary);
}
-QString UMLClassifierListItem::getTypeName() {
+QString UMLClassifierListItem::getTypeName() const{
if (m_pSecondary == NULL)
return m_SecondaryId;
const UMLPackage *typePkg = m_pSecondary->getUMLPackage();
--- trunk/KDE/kdesdk/umbrello/umbrello/classifierlistitem.h #684178:684179
@@ -69,14 +69,14 @@
*
* @return The type of the UMLClassifierListItem.
*/
- UMLClassifier * getType();
+ UMLClassifier * getType() const;
/**
* Returns the type name of the UMLClassifierListItem.
*
* @return The type name of the UMLClassifierListItem.
*/
- virtual QString getTypeName();
+ virtual QString getTypeName() const;
/**
* Sets the type name of the UMLClassifierListItem.
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerationpolicy.h #684178:684179
@@ -55,20 +55,6 @@
enum CommentStyle { SingleLine=0, MultiLine };
enum ScopePolicy { Public=200, Private, Protected, FromParent };
-/* // set some reasonable defaults
- OverwritePolicy defaultOverwritePolicy() const;
- bool defaultVerboseSectionComments() const;
- bool defaultVerboseDocumentComments() const;
- bool defaultIncludeHeadings() const;
- NewLineType defaultLineEndingType() const;
- IndentationType defaultIndentType() const;
- int defaultIndentAmount() const;
- ModifyNamePolicy defaultModifyNamePolicy() const;
- CommentStyle defaultCommentStyle() const;
- ScopePolicy defaultAttribAccessorScope() const;
- ScopePolicy defaultAssocFieldScope() const;
- bool defaultAutoGenerateConstructors() const;
-*/
// Constructors/Destructors
//
--- trunk/KDE/kdesdk/umbrello/umbrello/entity.cpp #684178:684179
@@ -438,7 +438,7 @@
m_PrimaryKey = NULL;
}
-bool UMLEntity::hasPrimaryKey() {
+bool UMLEntity::hasPrimaryKey() const{
if ( m_PrimaryKey == NULL ) {
return false;
}
@@ -504,7 +504,7 @@
}
-UMLClassifierListItemList UMLEntity::getFilteredList(Uml::Object_Type ot){
+UMLClassifierListItemList UMLEntity::getFilteredList(Uml::Object_Type ot) const{
if ( ot == Uml::ot_EntityConstraint ) {
UMLClassifierListItemList ucList,fcList,ccList, rcList;
@@ -535,7 +535,7 @@
}
}
-bool UMLEntity::isPrimaryKey(UMLUniqueConstraint* uConstr){
+bool UMLEntity::isPrimaryKey(UMLUniqueConstraint* uConstr) const{
if ( uConstr == m_PrimaryKey ) {
return true;
}
@@ -543,7 +543,7 @@
return false;
}
-UMLEntityAttributeList UMLEntity::getEntityAttributes() {
+UMLEntityAttributeList UMLEntity::getEntityAttributes() const{
UMLEntityAttributeList entityAttributeList;
for (UMLObjectListIt lit(m_List); lit.current(); ++lit) {
UMLObject *listItem = lit.current();
--- trunk/KDE/kdesdk/umbrello/umbrello/entity.h #684178:684179
@@ -153,7 +153,7 @@
*
* @return The number of entityAttributes for the class.
*/
- int entityAttributes();
+ int entityAttributes() ;
/**
* Sets the UniqueConstraint passed as the Primary Key of this Entity
@@ -178,14 +178,14 @@
*
* @return true if a Primary Key Exists for this UMLEntity
*/
- bool hasPrimaryKey();
+ bool hasPrimaryKey() const;
/**
* Checks if a given Unique Constraint is primary key of this entity
* @param uConstr A Unique Constraint
* @return bool true if passed paramater is a primary key of this entity
*/
- bool isPrimaryKey(UMLUniqueConstraint* uConstr);
+ bool isPrimaryKey(UMLUniqueConstraint* uConstr) const;
/**
* Adds a Constraint to this UMLEntity
@@ -220,13 +220,13 @@
/**
* Reimplementation of getFilteredList to support ot=Uml::ot_EntityConstraint
*/
- UMLClassifierListItemList getFilteredList(Uml::Object_Type ot);
+ UMLClassifierListItemList getFilteredList(Uml::Object_Type ot) const;
/**
* Returns the Entity Attributes
* Same as getFilteredList(Uml::ot_EntityAttribute)
*/
- UMLEntityAttributeList getEntityAttributes();
+ UMLEntityAttributeList getEntityAttributes() const;
private slots:
void slotEntityAttributeRemoved(UMLClassifierListItem*);
--- trunk/KDE/kdesdk/umbrello/umbrello/entityattribute.cpp #684178:684179
@@ -44,7 +44,7 @@
m_null = false;
}
-QString UMLEntityAttribute::getAttributes() {
+QString UMLEntityAttribute::getAttributes() const{
return m_attributes;
}
@@ -52,7 +52,7 @@
m_attributes = attributes;
}
-QString UMLEntityAttribute::getValues() {
+QString UMLEntityAttribute::getValues() const{
return m_values;
}
@@ -60,7 +60,7 @@
m_values = values;
}
-bool UMLEntityAttribute::getAutoIncrement() {
+bool UMLEntityAttribute::getAutoIncrement() const{
return m_autoIncrement;
}
@@ -68,7 +68,7 @@
m_autoIncrement = autoIncrement;
}
-Uml::DBIndex_Type UMLEntityAttribute::getIndexType() {
+Uml::DBIndex_Type UMLEntityAttribute::getIndexType() const{
return m_indexType;
}
@@ -76,7 +76,7 @@
m_indexType = indexType;
}
-bool UMLEntityAttribute::getNull() {
+bool UMLEntityAttribute::getNull() const{
return m_null;
}
@@ -174,5 +174,5 @@
return dialog.exec();
}
+#include "entityattribute.moc"
-
--- trunk/KDE/kdesdk/umbrello/umbrello/entityattribute.h #684178:684179
@@ -25,6 +25,7 @@
* Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
*/
class UMLEntityAttribute : public UMLAttribute {
+ Q_OBJECT
public:
/**
* Sets up an entityattribute.
@@ -74,7 +75,7 @@
*
* @return The value of the UMLEntityAttribute's attributes property.
*/
- QString getAttributes();
+ QString getAttributes() const;
/**
* Sets the initial value of the UMLEntityAttribute's attributes property.
@@ -88,7 +89,7 @@
*
* @return The initial value of the UMLEntityAttribute's index type property.
*/
- Uml::DBIndex_Type getIndexType();
+ Uml::DBIndex_Type getIndexType() const;
/**
* Sets the initial value of the UMLEntityAttribute's index type property.
@@ -102,7 +103,7 @@
*
* @return The initial value of the UMLEntityAttribute's length/values property.
*/
- QString getValues();
+ QString getValues() const;
/**
* Sets the initial value of the UMLEntityAttribute's length/values property.
@@ -116,7 +117,7 @@
*
* @return The initial value of the UMLEntityAttribute's auto_increment boolean
*/
- bool getAutoIncrement();
+ bool getAutoIncrement() const;
/**
* Sets the initial value of the UMLEntityAttribute's auto_increment boolean
@@ -130,7 +131,7 @@
*
* @return The initial value of the UMLEntityAttribute's allow null value.
*/
- bool getNull();
+ bool getNull() const;
/**
* Sets the initial value of the UMLEntityAttribute's allow null value.
--- trunk/KDE/kdesdk/umbrello/umbrello/foreignkeyconstraint.cpp #684178:684179
@@ -199,7 +199,7 @@
}
-bool UMLForeignKeyConstraint::hasEntityAttributePair(UMLEntityAttribute* pAttr,UMLEntityAttribute* rAttr) {
+bool UMLForeignKeyConstraint::hasEntityAttributePair(UMLEntityAttribute* pAttr,UMLEntityAttribute* rAttr) const {
if ( m_AttributeMap.contains( pAttr ) ) {
if ( m_AttributeMap.value( pAttr ) == rAttr ) {
--- trunk/KDE/kdesdk/umbrello/umbrello/foreignkeyconstraint.h #684178:684179
@@ -96,7 +96,7 @@
*/
void setReferencedEntity(UMLEntity* ent);
- UMLEntity* getReferencedEntity(){
+ UMLEntity* getReferencedEntity() const {
return m_ReferencedEntity;
}
@@ -133,7 +133,7 @@
* @param rAttr The Attribute of the Referenced Entity
* @return true if the attribute pair could be found.
*/
- bool hasEntityAttributePair(UMLEntityAttribute* pAttr,UMLEntityAttribute* rAttr);
+ bool hasEntityAttributePair(UMLEntityAttribute* pAttr,UMLEntityAttribute* rAttr) const;
/**
* Retrieve all Pairs of Attributes
@@ -145,14 +145,14 @@
/**
* Get the Delete Action
*/
- UpdateDeleteAction getDeleteAction(){
+ UpdateDeleteAction getDeleteAction() const {
return m_DeleteAction;
}
/**
* Get the Update Action
*/
- UpdateDeleteAction getUpdateAction(){
+ UpdateDeleteAction getUpdateAction() const {
return m_UpdateAction;
}
--- trunk/KDE/kdesdk/umbrello/umbrello/uml.cpp #684178:684179
@@ -86,7 +86,6 @@
#include "cmds.h"
#include "umbrellosettings.h"
-#include "kconfigdialog.h"
/// @todo This is an ugly _HACK_ to allow to compile umbrello.
/// All the menu stuff should be ported to KDE4 (using actions)
--- trunk/KDE/kdesdk/umbrello/umbrello/uniqueconstraint.h #684178:684179
@@ -117,7 +117,7 @@
/**
* Get the Entity Attributes List
*/
- UMLEntityAttributeList getEntityAttributeList(){
+ UMLEntityAttributeList getEntityAttributeList() const {
return m_EntityAttributeList;
}
More information about the umbrello-devel
mailing list