class UmlComponent
!!!192002.cpp!!!	init() : void
  declareFct("ownedmember", "uml:Component", &importIt);
  declareFct("packagedelement", "uml:Component", &importIt);
!!!196610.cpp!!!	importIt(inout in : FileIn, inout token : Token, inout where : UmlItem) : void
  where = where->container(aComponent, token, in);
  
  if (where == 0)
    return;
    
  QCString s = token.valueOf("name");
  
  if (s.isEmpty()) {
    static unsigned n = 0;
    
    s.sprintf("anonymous_component_%u", ++n);
  }
    
  UmlComponent * component = create((UmlComponentView *) where, s);
  
  if (component == 0)
    in.error("cannot create component '" + s +
	     "' in '" + where->name() + "'");
  
  component->addItem(token.xmiId(), in);

  if (! token.closed()) {
    QCString k = token.what();
    const char * kstr = k;
    
    while (in.read(), !token.close(kstr)) {
      QCString ks = token.what();
      
      if ((ks == "interfacerealization") || (ks == "realization"))
	component->manageInterface(token, in);
      else
	component->UmlItem::import(in, token);
    }
  }

  component->unload(TRUE, FALSE);
!!!196738.cpp!!!	manageInterface(inout token : Token, inout in : FileIn) : void
  QCString idref = token.valueOf("supplier");
  
  QMap<QCString, UmlItem *>::Iterator it = All.find(idref);
  int c = ((const char *) token.what())[0];
  
  if (it != All.end()) {
    if ((*it)->kind() == aClass) {
      if (c == 'i') {
	// provided
	QVector<UmlClass> provided = providedClasses();
	unsigned sz = provided.size();
	
	provided.resize(sz + 1);
	provided.insert(sz, (UmlClass *) *it);
	set_AssociatedClasses(realizingClasses(), provided, requiredClasses());
      }
      else {
	// realization
	QVector<UmlClass> realizing = realizingClasses();
	unsigned sz = realizing.size();
	
	realizing.resize(sz + 1);
	realizing.insert(sz, (UmlClass *) *it);
	set_AssociatedClasses(realizing, providedClasses(), requiredClasses());
      }
    }
  }
  else
    UnresolvedWithContext::add(this, idref, c);
    
  if (! token.closed())
    in.finish(token.what());
!!!244482.cpp!!!	container(in kind : anItemKind, in token : Token, inout in : FileIn) : UmlItem
  switch (kind) {
  case aComponent:
    return this;
  default:
    return parent()->container(kind, token, in);
  }
!!!212098.cpp!!!	solve(in context : int, in idref : string) : void
  QMap<QCString, UmlItem *>::Iterator it = All.find(idref);
  
  if (it != All.end()) {
    if ((*it)->kind() == aClass) {
      if (context == 'i') {
	// provided
	QVector<UmlClass> provided = providedClasses();
	unsigned sz = provided.size();
	
	provided.resize(sz + 1);
	provided.insert(sz, (UmlClass *) *it);
	set_AssociatedClasses(realizingClasses(), provided, requiredClasses());
      }
      else {
	// realization
	QVector<UmlClass> realizing = realizingClasses();
	unsigned sz = realizing.size();
	
	realizing.resize(sz + 1);
	realizing.insert(sz, (UmlClass *) *it);
	set_AssociatedClasses(realizing, providedClasses(), requiredClasses());
      }
    }
  }
  else if (!FileIn::isBypassedId(idref))
    UmlCom::trace("component : unknown reference '" + idref + "'<br>");
!!!255874.cpp!!!	generalizeDependRealize(inout target : UmlComponent, inout in : FileIn, in context : int, in label : string, in constraint : string) : void
  if ((context == 3) && (target->kind() == aClass)) {
    // usage indicate a required interface
    QVector<UmlClass> required = requiredClasses();
    unsigned sz = required.size();
    
    required.resize(sz + 1);
    required.insert(sz, (UmlClass *) target);
    set_AssociatedClasses(realizingClasses(), providedClasses(), required);
  }
  else
    UmlItem::generalizeDependRealize(target, in, context, label, constraint);
!!!255746.cpp!!!	solveGeneralizationDependencyRealization(in context : int, in idref : string, in label : string, in constraint : string) : void
  QMap<QCString, UmlItem *>::Iterator it;
  
  if ((context == 3) &&
      ((it = All.find(idref)) != All.end()) &&
      ((*it)->kind() == aClass)) {
    // usage indicate resuired interface
    QVector<UmlClass> required = requiredClasses();
    unsigned sz = required.size();
    
    required.resize(sz + 1);
    required.insert(sz, (UmlClass *) *it);
    set_AssociatedClasses(realizingClasses(), providedClasses(), required);
  }
  else
    UmlItem::solveGeneralizationDependencyRealization(context, idref, label, constraint);
