class UmlUseCase
!!!193282.cpp!!!	container(in kind : anItemKind, in token : Token, inout in : FileIn) : UmlItem
  switch (kind) {
  case aClass:
  case aClassInstance:
  case anUseCase:
  case aState:
  case anActivity:
    return this;
  default:
    return parent()->container(kind, token, in);
  }

!!!218498.cpp!!!	solve(in context : int, in idref : string) : void
  QMap<QCString, UmlItem *>::Iterator it = All.find(idref);
      
  if (it == All.end()) {
    if (!FileIn::isBypassedId(idref))
      UmlCom::trace("extend/include : unknown use case reference '" + idref + "'<br>");
  }
  else if ((*it)->kind() != anUseCase)
    UmlCom::trace("'" + idref + "' is not a use case<br>");
  else {
    UmlItem * rel = UmlNcRelation::create(aDependency, this, *it);
    
    if (rel == 0)
      UmlCom::trace("cannot create dependency from '" + name() + "' to '" + (*it)->name() + "'");
    else
      rel->set_Stereotype((context) ? "extend" : "include ");
  }
!!!193666.cpp!!!	init() : void
  declareFct("ownedmember", "uml:UseCase", &importIt);
  declareFct("ownedusecase", "uml:UseCase", &importIt);
  declareFct("packagedelement", "uml:UseCase", &importIt);

  declareFct("extend", "uml:Extend", &importExtendInclude);
  declareFct("include", "uml:Include", &importExtendInclude);

  declareFct("extensionpoint", "uml:ExtensionPoint", &importExtensionPoint);

!!!195970.cpp!!!	importIt(inout in : FileIn, inout token : Token, inout where : UmlItem) : void
  where = where->container(anUseCase, token, in);
    
  if (where != 0) {
    QCString s = token.valueOf("name");
    
    if (s.isEmpty()) {
      static unsigned n = 0;
      
      s.sprintf("anonymous_usecase_%u", ++n);
    }
    
    UmlUseCase * uc = create(where, s);
    
    if (uc == 0)
      in.error("cannot create use case '" + s +
	       "' in '" + where->name() + "'");
    
    uc->addItem(token.xmiId(), in);
    
    if (! token.closed()) {
      QCString k = token.what();
      const char * kstr = k;
      
      while (in.read(), !token.close(kstr))
	uc->UmlItem::import(in, token);
    }

    uc->unload(TRUE, FALSE);
  }
!!!218370.cpp!!!	importExtendInclude(inout in : FileIn, inout token : Token, inout where : UmlItem) : void
  if (where->kind() == anUseCase) {
    bool extend = (token.what() == "extend");
    QCString other = token.valueOf((extend) ? "extendedcase" : "addition");
    
    if (other.isEmpty())
      in.warning((extend) ? "extendedCase is missing" : "addition is missing");
    else {
      QMap<QCString, UmlItem *>::Iterator it = All.find(other);
      
      if (it != All.end())
	where->solve(extend, other);
      else
	UnresolvedWithContext::add(where, other, extend);
    }
  }

  if (! token.closed())
    in.finish(token.what());
!!!129156.cpp!!!	importExtensionPoint(inout in : FileIn, inout token : Token, inout where : UmlItem) : void
  if (where->kind() == anUseCase) {
    QCString ep = token.valueOf("name");
    
    if (!ep.isEmpty()) {
      QCString eps = ((UmlUseCase *) where)->extensionPoints();
      
      if (! eps.isEmpty())
	eps += "\n" + ep;
      else
	eps = ep;
      
      ((UmlUseCase *) where)->set_ExtensionPoints(eps);
    }
  }

  if (! token.closed())
    in.finish(token.what());
