cppsourcecodeclassfielddeclarationblock.cpp
00001 /*************************************************************************** 00002 * * 00003 * This program is free software; you can redistribute it and/or modify * 00004 * it under the terms of the GNU General Public License as published by * 00005 * the Free Software Foundation; either version 2 of the License, or * 00006 * (at your option) any later version. * 00007 * * 00008 ***************************************************************************/ 00009 00010 /* This code generated by: 00011 * Author : thomas 00012 * Date : Mon Sep 1 2003 00013 */ 00014 00015 #include "cppsourcecodeclassfielddeclarationblock.h" 00016 00017 #include "cppcodeclassfield.h" 00018 #include "../model_utils.h" 00019 00020 // Constructors/Destructors 00021 // 00022 00023 CPPSourceCodeClassFieldDeclarationBlock::CPPSourceCodeClassFieldDeclarationBlock ( CodeClassField * parent ) 00024 : CodeClassFieldDeclarationBlock ( parent ) 00025 { 00026 setOverallIndentationLevel(1); 00027 updateContent(); 00028 } 00029 00030 CPPSourceCodeClassFieldDeclarationBlock::~CPPSourceCodeClassFieldDeclarationBlock ( ) { } 00031 00032 // 00033 // Methods 00034 // 00035 00036 // Other methods 00037 // 00038 00041 void CPPSourceCodeClassFieldDeclarationBlock::updateContent( ) 00042 { 00043 00044 /* 00045 CodeClassField * cf = getParentClassField(); 00046 ClassifierCodeDocument * doc = cf->getParentDocument(); 00047 CPPCodeClassField * jcf = dynamic_cast<CPPCodeClassField*>(cf); 00048 CPPClassifierCodeDocument* jdoc = dynamic_cast<CPPClassifierCodeDocument*>(doc); 00049 00050 // Set the comment 00051 QString notes = getParentObject()->getDoc(); 00052 getComment()->setText(notes); 00053 00054 // Set the body 00055 QString staticValue = getParentObject()->getStatic() ? "static " : ""; 00056 QString scopeStr = getParentObject()->getVisibility().toString(); 00057 00058 QString typeName = jcf->getTypeName(); 00059 QString fieldName = jcf->getFieldName(); 00060 QString initialV = jcf->getInitialValue(); 00061 00062 QString body = staticValue+scopeStr+" "+typeName+" "+fieldName; 00063 if (!initialV.isEmpty()) 00064 body.append(" = " + initialV); 00065 setText(body+";"); 00066 */ 00067 setText("FIX ME;"); 00068 00069 00070 } 00071 00072 00073 00074 #include "cppsourcecodeclassfielddeclarationblock.moc"
