本文整理汇总了C++中FileOut::id方法的典型用法代码示例。如果您正苦于以下问题:C++ FileOut::id方法的具体用法?C++ FileOut::id怎么用?C++ FileOut::id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileOut
的用法示例。
在下文中一共展示了FileOut::id方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write_actor
void UmlClass::write_actor(FileOut & out)
{
out.indent();
out << "<UML:Actor name=\"" << name() << '"';
out.id(this);
out << " visibility=\"public\" isAbstract=\""
<< ((isAbstract()) ? "true" : "false")
<< "\" isActive=\"false\" >\n";
out.indent(+1);
if (stereotype() != "actor")
write_stereotype(out);
write_description_properties(out);
out.indent(-1);
out.indent();
out << "</UML:Actor>\n";
const QVector<UmlItem*> ch = children();
unsigned n = ch.size();
for (unsigned i = 0; i != n; i += 1)
if (ch[i]->kind() == aRelation)
ch[i]->write_if_needed(out);
}
示例2: write
void UmlClassView::write(FileOut & out)
{
if (_gen_views) {
out.indent();
out << ((_uml_20) ? "<ownedMember" : "<packagedElement")
<< " xmi:type=\"uml:Package\"";
out.id(this);
out << " name =\"class view ";
out.quote(name());
out << "\">\n";
out.indent(+1);
write_description_properties(out);
}
const QVector<UmlItem*> ch = children();
unsigned n = ch.size();
for (unsigned i = 0; i != n; i += 1)
ch[i]->write(out);
if (_gen_views) {
while (! _relations.isEmpty())
_relations.takeAt(0)->write(out, FALSE);
out.indent(-1);
out.indent();
out << ((_uml_20) ? "</ownedMember>\n" : "</packagedElement>\n");
}
}
示例3: write
void UmlNode::write(FileOut & out)
{
const char * k = (_uml_20) ? "ownedMember" : "packagedElement";
out.indent();
out << "<" << k << " xmi:type=\""
<< ((stereotype() == "device\"") ? "uml:Device" : "uml:Node\"");
out.id(this);
out << " name=\"";
out.quote((const char *)name()); //[jasa] ambiguous call
out << "\">\n";
out.indent(+1);
write_description_properties(out);
const QVector<UmlItem*> ch = children();
unsigned n = ch.size();
for (unsigned i = 0; i != n; i += 1)
ch[i]->write(out);
out.indent(-1);
out.indent();
out << "</" << k << ">\n";
unload();
}
示例4: write_if_needed
bool UmlComponent::write_if_needed(FileOut & out)
{
parent()->write(out);
out.indent();
out << "<UML:Component name=\"";
out.quote(name());
out << '"';
out.id(this);
out << " visibility=\"public\" isAbstract=\"false\" isActive=\"false\" >\n";
out.indent(+1);
write_stereotype(out);
write_description_properties(out);
out.indent(-1);
out.indent();
out << "</UML:Component>\n";
const Q3PtrVector<UmlItem> ch = children();
unsigned n = ch.size();
for (unsigned i = 0; i != n; i += 1)
ch[i]->write_if_needed(out);
unload();
return TRUE;
}
示例5: write
void UmlNcRelation::write(FileOut & out)
{
if ((relationKind() == aDependency) &&
(parent()->kind() == anUseCase) &&
(target()->kind() == anUseCase)) {
const char * t;
const char * r;
if (stereotype() == "include") {
t = "Include";
r = "addition";
}
else if (stereotype() == "extend") {
t = "Extend";
r = "extendedCase";
}
else {
write(out, TRUE);
return;
}
out.indent();
out << "<" << stereotype() << " xmi:type=\"uml:" << t << "\"";
out.id(this);
out.ref(target(), r);
out << ">\n";
out.indent(+1);
write_description_properties(out);
out.indent(-1);
out.indent();
out << "</" << stereotype() << ">\n";
}
else
write(out, TRUE);
}
示例6: write
void UmlActivityPartition::write(FileOut & out) {
const char * p = (parent()->kind() == aPartition)
? "subpartition" : "group";
out.indent();
out << "<" << p << " xmi:type=\"uml:ActivityPartition\" name=\"";
out.quote((const char*)name());//[jasa] ambiguous call
out << '"';
out.id(this);
if (isDimension())
out << " isDimension=\"true\"";
if (isExternal())
out << " isExternal=\"true\"";
if (represents() != 0)
out.ref(represents(), "represents");
out << ">\n";
out.indent(+1);
write_description_properties(out);
const Q3PtrVector<UmlItem> ch = children();
unsigned n = ch.size();
for (unsigned i = 0; i != n; i += 1)
ch[i]->write(out);
out.indent(-1);
out.indent();
out << "</" << p << ">\n";
unload();
}
示例7: write_generalization
void UmlNcRelation::write_generalization(FileOut & out)
{
out.indent();
out << "<generalization xmi:type=\"uml:Generalization\"";
out.id(this);
out.ref(target(), "general");
out << "/>\n";
}
示例8: write
void UmlArtifact::write(FileOut & out)
{
const char * k = (_uml_20) ? "ownedMember" : "packagedElement";
out.indent();
out << "<" << k << " xmi:type=\"uml:Artifact\"";
out.id(this);
out << " name=\"";
out.quote((const char *)name()); //[jasa] ambiguous call
out << "\">\n";
out.indent(+1);
write_description_properties(out);
const Q3PtrVector<UmlItem> ch = children();
unsigned i;
unsigned n = ch.size();
unsigned rank = 0;
for (i = 0; i != n; i += 1) {
UmlItem * x = ch[i];
if ((x->kind() == aNcRelation) &&
(x->stereotype() == "manifest") &&
(((UmlNcRelation *) x)->relationKind() == aDependency))
write_manifest(out, ((UmlNcRelation *) x)->target(), "dependency", ++rank);
else
ch[i]->write(out);
}
if (stereotype() == "source") {
const Q3PtrVector<UmlClass> & cls = associatedClasses();
n = cls.size();
for (i = 0; i != n; i += 1)
write_manifest(out, cls[i], "source", ++rank);
}
else {
const Q3PtrVector<UmlArtifact> & arts = associatedArtifacts();
n = arts.size();
for (i = 0; i != n; i += 1)
write_manifest(out, arts[i], 0, ++rank);
}
out.indent(-1);
out.indent();
out << "</" << k << ">\n";
unload();
}
示例9: write_begin
void UmlActivityAction::write_begin(FileOut & out, Q3CString k) {
out.indent();
out << ((parent()->kind() == anActivity) ? "<node" : "<containedNode")
<< " xmi:type=\"uml:" << k << '"';
out.id(this);
if (!name().isEmpty()){
out << " name=\"";
out.quote(name());
out << '"';
}
}
示例10: write
void UmlActivityParameter::write(FileOut & out) {
// write parameter def
out.indent();
out << "<ownedParameter name=\"";
out.quote(name());
out << '"';
out.id(this);
write_dir(out);
write_effect(out);
write_flags(out);
out << ">\n";
out.indent(+1);
write_description_properties(out);
write_multiplicity(out, multiplicity(), this);
write_default_value(out, defaultValue(), this);
UmlItem::write_type(out, type());
out.indent(-1);
out.indent();
out << "</ownedParameter>\n";
//write parameter node
out.indent();
out << "<node xmi:type=\"uml:ActivityParameterNode\" name =\"";
out.quote(name());
out << '"';
out.id_prefix(this, "PARAMETER_NODE_");
if (isControlType())
out << " isControlType=\"true\"";
write_ordering(out);
write_selection(out);
write_in_state(out);
out << ">\n";
out.indent(+1);
UmlItem::write_type(out, type());
const Q3PtrVector<UmlItem> ch = children();
unsigned n = ch.size();
for (unsigned i = 0; i != n; i += 1)
ch[i]->write(out);
out.indent(-1);
out.indent();
out << "</node>\n";
unload();
}
示例11: write
void UmlActivityObject::write(FileOut & out)
{
const char * k = (parent()->kind() == anActivity)
? "node" : "containedNode";
out.indent();
out << '<' << k << " xmi:type=\"uml:";
WrapperStr st = stereotype();
if (st == "datastore")
out << "DataStoreNode";
else if (st == "centralBuffer")
out << "CentralBufferNode";
else
out << "ObjectNode";
out << "\" name=\"";
out.quote(name());
out << '"';
out.id(this);
if (isControlType())
out << " isControlType=\"true\"";
write_ordering(out);
write_selection(out);
write_in_state(out);
out << ">\n";
out.indent(+1);
write_description_properties(out);
write_multiplicity(out, multiplicity(), this);
UmlItem::write_type(out, type());
const QVector<UmlItem*> ch = children();
unsigned n = ch.size();
for (unsigned i = 0; i != n; i += 1)
ch[i]->write(out);
write_incoming_flows(out);
out.indent(-1);
out.indent();
out << "</" << k << ">\n";
unload();
}
示例12: write_generalization
void UmlRelation::write_generalization(FileOut & out) {
out.indent();
out << "<generalization xmi:type=\"uml:Generalization\"";
out.id(this);
out.ref(roleType(), "general");
if (!constraint().isEmpty()) {
out << ">\n";
out.indent(+1);
write_constraint(out);
out.indent(-1);
out.indent();
out << "</generalization>\n";
}
else
out << "/>\n";
}
示例13: write_dependency
void UmlRelation::write_dependency(FileOut & out) {
const char * k = (_uml_20) ? "ownedElement" : "packagedElement";
out.indent();
out << '<' << k << " xmi:type=\"uml:Dependency\"";
out.id(this);
out.ref(parent(), "client");
out.ref(roleType(), "supplier");
out << ">\n";
out.indent(+1);
write_constraint(out);
write_description_properties(out);
out.indent(-1);
out.indent();
out << "</" << k << ">\n";
}
示例14: write_dependency
void UmlNcRelation::write_dependency(FileOut & out)
{
const char * k = (_uml_20) ? "ownedElement" : "packagedElement";
out.indent();
out << '<' << k <<
(((parent()->kind() == anArtifact) && (stereotype() == "manifest"))
? " xmi:type=\"uml:Manifestation\"" : " xmi:type=\"uml:Dependency\"");
out.id(this);
out.ref(parent(), "client");
out.ref(target(), "supplier");
out << ">\n";
out.indent(+1);
write_description_properties(out);
out.indent(-1);
out.indent();
out << "</" << k << ">\n";
}
示例15: write
void UmlFinalState::write(FileOut & out)
{
out.indent();
out << "<subvertex xmi:type=\"uml:FinalState\"";
out.id(this);
out << " name=\"Final\">\n";
out.indent(+1);
write_description_properties(out);
while (! _incoming_trans.isEmpty())
_incoming_trans.take(0)->write_in(out);
out.indent(-1);
out.indent();
out << "</subvertex>\n";
unload();
}