Changeset View
Changeset View
Standalone View
Standalone View
umbrello/codegenerators/xml/xmlschemawriter.cpp
Context not available. | |||||
136 | // tidy up. no dangling open files please.. | 136 | // tidy up. no dangling open files please.. | ||
---|---|---|---|---|---|
137 | file.close(); | 137 | file.close(); | ||
138 | 138 | | |||
139 | // bookeeping for code generation | 139 | // bookkeeping for code generation | ||
140 | emit codeGenerated(c, true); | 140 | emit codeGenerated(c, true); | ||
141 | emit showGeneratedFile(file.fileName()); | 141 | emit showGeneratedFile(file.fileName()); | ||
142 | 142 | | |||
Context not available. | |||||
319 | QString superClassName = getElementTypeName(superclasses.first()); | 319 | QString superClassName = getElementTypeName(superclasses.first()); | ||
320 | xs << indent() << "<" << makeSchemaTag(QLatin1String("complexContent")) << ">" << m_endl; | 320 | xs << indent() << "<" << makeSchemaTag(QLatin1String("complexContent")) << ">" << m_endl; | ||
321 | 321 | | |||
322 | //PROBLEM: we only treat ONE superclass for inheritence.. bah. | 322 | //PROBLEM: we only treat ONE superclass for inheritance.. bah. | ||
323 | m_indentLevel++; | 323 | m_indentLevel++; | ||
324 | xs << indent() << "<" << makeSchemaTag(QLatin1String("extension")) << " base=\"" << makePackageTag(superClassName) | 324 | xs << indent() << "<" << makeSchemaTag(QLatin1String("extension")) << " base=\"" << makePackageTag(superClassName) | ||
325 | <<"\""; | 325 | <<"\""; | ||
Context not available. | |||||
735 | // | 735 | // | ||
736 | // The flipside for concrete classes is that we want to use them as elements in our document. | 736 | // The flipside for concrete classes is that we want to use them as elements in our document. | ||
737 | // Unfortunately, about all you can do with complexTypes in terms of inheritance, is to | 737 | // Unfortunately, about all you can do with complexTypes in terms of inheritance, is to | ||
738 | // use these as the basis for a new node type. This is NOT full inheritence because the new | 738 | // use these as the basis for a new node type. This is NOT full inheritance because the new | ||
739 | // class (err. element node) wont be able to go into the document where it parent went without | 739 | // class (err. element node) wont be able to go into the document where it parent went without | ||
740 | // you heavily editing the schema. | 740 | // you heavily editing the schema. | ||
741 | // | 741 | // | ||
Context not available. | |||||
744 | // as complexTypes. | 744 | // as complexTypes. | ||
745 | // | 745 | // | ||
746 | // Of course, in OO methodology, you should be able to inherit from | 746 | // Of course, in OO methodology, you should be able to inherit from | ||
747 | // any class, but schema just don't allow use to have full inheritence using either groups | 747 | // any class, but schema just don't allow use to have full inheritance using either groups | ||
748 | // or complexTypes. Thus we have taken a middle rode. If someone wants to key me into a | 748 | // or complexTypes. Thus we have taken a middle rode. If someone wants to key me into a | ||
749 | // better way to represent this, I'd be happy to listen. =b.t. | 749 | // better way to represent this, I'd be happy to listen. =b.t. | ||
750 | // | 750 | // | ||
Context not available. | |||||
773 | /** | 773 | /** | ||
774 | * Replaces `string' with `String' and `bool' with `boolean' | 774 | * Replaces `string' with `String' and `bool' with `boolean' | ||
775 | * IF the type is "string" we need to declare it as | 775 | * IF the type is "string" we need to declare it as | ||
776 | * the XMLSchema Object "String" (there is no string primative in XMLSchema). | 776 | * the XMLSchema Object "String" (there is no string primitive in XMLSchema). | ||
777 | * Same thing again for "bool" to "boolean". | 777 | * Same thing again for "bool" to "boolean". | ||
778 | */ | 778 | */ | ||
779 | QString XMLSchemaWriter::fixTypeName(const QString& string) | 779 | QString XMLSchemaWriter::fixTypeName(const QString& string) | ||
Context not available. |