コード例 #1
0
ファイル: UmlClass.cpp プロジェクト: gregsmirnov/bouml
void UmlClass::html(QCString pfix, unsigned int rank, unsigned int level) {
  QCString s = stereotype();
  
  if (flat) {
    define();
    if (s == "stereotype")
      chapter("Stereotype", pfix, rank, "stereotype", level);
    else if (s == "metaclass")
      chapter("Metaclass", pfix, rank, "metaclass", level);
    else
      chapter("Class", pfix, rank, "class", level);
    gen_html(pfix, rank, level);
    unload(FALSE, FALSE);
  }
  else {
    if (s == "stereotype")
      fw.write("<table><tr><td><div class=\"element\">Stereotype <b>");
    else if (s == "metaclass")
      fw.write("<table><tr><td><div class=\"element\">Metaclass <b>");
    else
      fw.write("<table><tr><td><div class=\"element\">Class <b>");
    write();
    fw.write("</b></div></td></tr></table>\n");
  }
}
コード例 #2
0
ファイル: UmlClass.cpp プロジェクト: gregsmirnov/bouml
void UmlClass::html() {
  QCString s;
  
  UmlCom::message(name());
  
  if (stereotype() == "stereotype")
    start_file("stereotype" + s.setNum((unsigned) getIdentifier()), "Stereotype " + name(), TRUE);
  else if (stereotype() == "metaclass")
    start_file("metaclass" + s.setNum((unsigned) getIdentifier()), "Metaclass " + name(), TRUE);
  else
    start_file("class" + s.setNum((unsigned) getIdentifier()), "Class " + name(), TRUE);
  define();
  gen_html("", 0, 0);
  end_file();
  
  unload(FALSE, FALSE);
}
コード例 #3
0
void
view_init(int refresh)
{
  int Timeouts = 0, SumRTT, CountRTT, MinRTT = 0, PktsRetrans = 0, FastRetran, DataPktsOut;
  int AckPktsOut, CurrentMSS, DupAcksIn, AckPktsIn, MaxRwinRcvd = 0, Sndbuf = 0;
  int CurrentCwnd = 0, SndLimTimeRwin, SndLimTimeCwnd, SndLimTimeSender, DataBytesOut;
  int SndLimTransRwin, SndLimTransCwnd, SndLimTransSender, MaxSsthresh;
  int CurrentRTO, CurrentRwinRcvd, CongestionSignals, PktsOut = 0;
  FILE *fp;
  int c2sspd = 0, s2cspd = 0;
  char ip_addr2[64], buff[512], *str, tmpstr[32];
  int link=0, mismatch=0, bad_cable=0, half_duplex=0, congestion=0;
  int c2sdata = 0, c2sack, s2cdata, s2cack = 0;
  int totalcnt=0, view_flag=0;

  if ((fp = fopen(get_logfile(), "r")) == NULL)
    return;

  while ((fgets(buff, 512, fp)) != NULL) {
    if ((str = strchr(buff, ',')) != NULL) {
      sscanf(buff, "%[^,]s", date);
      str++;
      sscanf(str, "%[^,]s", ip_addr2);
      if ((str = strchr(str, ',')) == NULL)
        continue;
      /* skip over s2c cwnd-limited speed value */
      str++;
      sscanf(str, "%[^,]s", tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      c2sspd = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      s2cspd = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      Timeouts = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      SumRTT = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      CountRTT = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      PktsRetrans = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      FastRetran = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      DataPktsOut = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      AckPktsOut = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      CurrentMSS = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      DupAcksIn = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      AckPktsIn = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      MaxRwinRcvd = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      Sndbuf = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      CurrentCwnd = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      SndLimTimeRwin = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      SndLimTimeCwnd = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      SndLimTimeSender = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      DataBytesOut = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      SndLimTransRwin = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      SndLimTransCwnd = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      SndLimTransSender = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      MaxSsthresh = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      CurrentRTO = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      CurrentRwinRcvd = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      link = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      mismatch = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      bad_cable = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      half_duplex = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      congestion = atoi(tmpstr);

      str = strchr(str, ',');
      if (str == NULL) {
        CongestionSignals = -1;
        goto display;
      }
      str += 1;
      sscanf(str, "%[^,]s", tmpstr);
      c2sdata = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      c2sack = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      s2cdata = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      s2cack = atoi(tmpstr);

      str = strchr(str, ',');
      if (str == NULL) {
        CongestionSignals = -1;
        goto display;
      }
      str += 1;
      sscanf(str, "%[^,]s", tmpstr);
      CongestionSignals = atoi(tmpstr);

      str = strchr(str, ',') +1;
      sscanf(str, "%[^,]s", tmpstr);
      PktsOut = atoi(tmpstr);

      str = strchr(str, ',');
      if (str == NULL)
        MinRTT = -1;
      else {
        str += 1;
        sscanf(str, "%[^,]s", tmpstr);
        MinRTT = atoi(tmpstr);
      }

display:
      log_println(4, "Web100 variables line received\n");
      totalcnt = calculate(date, SumRTT, CountRTT, CongestionSignals, PktsOut, DupAcksIn, AckPktsIn,
          CurrentMSS, SndLimTimeRwin, SndLimTimeCwnd, SndLimTimeSender,
          MaxRwinRcvd, CurrentCwnd, Sndbuf, DataBytesOut, mismatch, bad_cable,
          c2sspd, s2cspd, c2sdata, s2cack, view_flag);
    }

  }
  fclose(fp);
  view_flag = 1;
  gen_html(c2sspd, s2cspd, MinRTT, PktsRetrans, Timeouts, Sndbuf, MaxRwinRcvd,
      CurrentCwnd, mismatch, bad_cable, totalcnt, refresh);
}