void LatexDocVisitor::visit(DocIncOperator *op)
{   
   if (op->isFirst()) {
      if (!m_hide) {
         m_t << "\n\\begin{DoxyCodeInclude}\n";
      }
      pushEnabled();
      m_hide = true;
   }
   SrcLangExt langExt = getLanguageFromFileName(m_langExt);
   if (op->type() != DocIncOperator::Skip) {
      popEnabled();
      if (!m_hide) {
         Doxy_Globals::parserManager->getParser(m_langExt)
         ->parseCode(m_ci, op->context(), op->text(), langExt,
                     op->isExample(), op->exampleFile());
      }
      pushEnabled();
      m_hide = true;
   }
   if (op->isLast()) {
      popEnabled();
      if (!m_hide) {
         m_t << "\n\\end{DoxyCodeInclude}\n";
      }
   } else {
      if (!m_hide) {
         m_t << endl;
      }
   }
}
示例#2
0
void DocbookDocVisitor::visit(DocIncOperator *op)
{
  if (op->isFirst())
  {
    if (!m_hide)
    {
      m_t << "<programlisting>";
    }
    pushEnabled();
    m_hide = TRUE;
  }
  SrcLangExt langExt = getLanguageFromFileName(m_langExt);
  if (op->type()!=DocIncOperator::Skip)
  {
    popEnabled();
    if (!m_hide)
    {
      Doxygen::parserManager->getParser(m_langExt)
        ->parseCode(m_ci,op->context(),
            op->text(),langExt,op->isExample(),
            op->exampleFile());
    }
    pushEnabled();
    m_hide=TRUE;
  }
  if (op->isLast())
  {
    popEnabled();
    if (!m_hide) m_t << "</programlisting>";
  }
  else
  {
    if (!m_hide) m_t << endl;
  }
}
示例#3
0
void LatexDocVisitor::visit(DocIncOperator *op)
{
  //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
  //    op->type(),op->isFirst(),op->isLast(),op->text().data());
  if (op->isFirst()) 
  {
    if (!m_hide) m_t << "\n\n\\footnotesize\\begin{verbatim}"; 
    pushEnabled();
    m_hide = TRUE;
  }
  if (op->type()!=DocIncOperator::Skip) 
  {
    popEnabled();
    if (!m_hide) parseCode(m_ci,op->context(),op->text().latin1(),op->isExample(),op->exampleFile());
    pushEnabled();
    m_hide=TRUE;
  }
  if (op->isLast())  
  {
    popEnabled();
    if (!m_hide) m_t << "\\end{verbatim}\n\\normalsize" << endl; 
  }
  else
  {
    if (!m_hide) m_t << endl;
  }
}
示例#4
0
void LatexDocVisitor::visit(DocIncOperator *op)
{
  //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
  //    op->type(),op->isFirst(),op->isLast(),op->text().data());
  if (op->isFirst()) 
  {
    if (!m_hide) m_t << "\n\\begin{DoxyCodeInclude}\n";
    pushEnabled();
    m_hide = TRUE;
  }
  SrcLangExt langExt = getLanguageFromFileName(m_langExt);
  if (op->type()!=DocIncOperator::Skip) 
  {
    popEnabled();
    if (!m_hide) 
    {
      Doxygen::parserManager->getParser(m_langExt)
                            ->parseCode(m_ci,op->context(),op->text(),langExt,
                                        op->isExample(),op->exampleFile());
    }
    pushEnabled();
    m_hide=TRUE;
  }
  if (op->isLast())  
  {
    popEnabled();
    if (!m_hide) m_t << "\n\\end{DoxyCodeInclude}\n";
  }
  else
  {
    if (!m_hide) m_t << endl;
  }
}
示例#5
0
void HtmlDocVisitor::visit(DocIncOperator *op)
{
  //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
  //    op->type(),op->isFirst(),op->isLast(),op->text().data());
  if (op->isFirst()) 
  {
    if (!m_hide) m_t << PREFRAG_START;
    pushEnabled();
    m_hide=TRUE;
  }
  if (op->type()!=DocIncOperator::Skip) 
  {
    popEnabled();
    if (!m_hide) 
    {
      Doxygen::parserManager->getParser(m_langExt)
                            ->parseCode(m_ci,op->context(),
                                op->text(),op->isExample(),
                                op->exampleFile());
    }
    pushEnabled();
    m_hide=TRUE;
  }
  if (op->isLast())  
  {
    popEnabled();
    if (!m_hide) m_t << PREFRAG_END;
  }
  else
  {
    if (!m_hide) m_t << endl;
  }
}
示例#6
0
void RTFDocVisitor::includePicturePreRTF(const QCString name, const bool isTypeRTF, const bool hasCaption)
{
  if (isTypeRTF)
  {
    m_t << "\\par" << endl;
    m_t << "{" << endl;
    m_t << rtf_Style_Reset << endl;
    if (hasCaption || m_lastIsPara) m_t << "\\par" << endl;
    m_t << "\\pard \\qc { \\field\\flddirty {\\*\\fldinst  INCLUDEPICTURE \"";
    m_t << name;
    m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt Image}}" << endl;
    m_t << "\\par" << endl;
    if (hasCaption)
    {
       m_t << "\\pard \\qc \\b";
       m_t << "{Image \\field\\flddirty{\\*\\fldinst { SEQ Image \\\\*Arabic }}{\\fldrslt {\\noproof 1}} ";
    }
    m_lastIsPara=TRUE;
  }
  else // other format -> skip
  {
    pushEnabled();
    m_hide=TRUE;
  }
}
示例#7
0
void HtmlDocVisitor::visitPre(DocImage *img)
{
  if (img->type()==DocImage::Html)
  {
    forceEndParagraph(img);
    if (m_hide) return;
    QString baseName=img->name();
    int i;
    if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
    {
      baseName=baseName.right(baseName.length()-i-1);
    }
    m_t << "<div class=\"image\">" << endl;
    m_t << "<img src=\"" << img->relPath() << img->name() << "\" alt=\"" 
        << baseName << "\"" << htmlAttribsToString(img->attribs()) 
        << "/>" << endl;
    if (img->hasCaption())
    {
      m_t << "<div class=\"caption\">" << endl;
    }
  }
  else // other format -> skip
  {
    pushEnabled();
    m_hide=TRUE;
  }
}
示例#8
0
void RTFDocVisitor::visit(DocIncOperator *op)
{
  //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
  //    op->type(),op->isFirst(),op->isLast(),op->text().data());
  DBG_RTF("{\\comment RTFDocVisitor::visit(DocIncOperator)}\n");
  SrcLangExt langExt = getLanguageFromFileName(m_langExt);
  if (op->isFirst()) 
  {
    if (!m_hide)
    {
      m_t << "{" << endl;
      m_t << "\\par" << endl;
      m_t << rtf_Style_Reset << getStyle("CodeExample");
    }
    pushEnabled();
    m_hide = TRUE;
  }
  if (op->type()!=DocIncOperator::Skip) 
  {
    popEnabled();
    if (!m_hide) 
    {
      Doxygen::parserManager->getParser(m_langExt)
                            ->parseCode(m_ci,op->context(),op->text(),langExt,
                                        op->isExample(),op->exampleFile());
    }
    pushEnabled();
    m_hide=TRUE;
  }
  if (op->isLast())  
  {
    popEnabled();
    if (!m_hide)
    {
      m_t << "\\par";
      m_t << "}" << endl;
    }
    m_lastIsPara=TRUE;
  }
  else
  {
    if (!m_hide) m_t << endl;
    m_lastIsPara=FALSE;
  }
}
示例#9
0
void RTFDocVisitor::visitPre(DocMscFile *df)
{
  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocMscFile)}\n");
  writeMscFile(df->file());

  // hide caption since it is not supported at the moment
  pushEnabled();
  m_hide=TRUE;
}
示例#10
0
void ManDocVisitor::visit(DocIncOperator *op)
{
  SrcLangExt langExt = getLanguageFromFileName(m_langExt);
  //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
  //    op->type(),op->isFirst(),op->isLast(),op->text().data());
  if (op->isFirst()) 
  {
    if (!m_hide)
    {
      if (!m_firstCol) m_t << endl;
      m_t << ".PP" << endl;
      m_t << ".nf" << endl;
    }
    pushEnabled();
    m_hide = TRUE;
  }
  if (op->type()!=DocIncOperator::Skip) 
  {
    popEnabled();
    if (!m_hide) 
    {
      Doxygen::parserManager->getParser(m_langExt)
                            ->parseCode(m_ci,op->context(),op->text(),langExt,
                                        op->isExample(),op->exampleFile());
    }
    pushEnabled();
    m_hide=TRUE;
  }
  if (op->isLast())  
  {
    popEnabled();
    if (!m_hide)
    {
      if (!m_firstCol) m_t << endl;
      m_t << ".fi" << endl;
      m_t << ".PP" << endl;
      m_firstCol=TRUE;
    }
  }
  else
  {
    if (!m_hide) m_t << endl;
  }
}
void ManDocVisitor::visit(DocIncOperator *op)
{
   SrcLangExt langExt = getLanguageFromFileName(m_langExt);   

   if (op->isFirst()) {
      if (!m_hide) {
         if (!m_firstCol) {
            m_t << endl;
         }

         m_t << ".PP" << endl;
         m_t << ".nf" << endl;
      }
      pushEnabled();
      m_hide = true;
   }

   if (op->type() != DocIncOperator::Skip) {
      popEnabled();
      if (!m_hide) {
         Doxy_Globals::parserManager->getParser(m_langExt)
         ->parseCode(m_ci, op->context(), op->text(), langExt,
                     op->isExample(), op->exampleFile());
      }
      pushEnabled();
      m_hide = true;
   }
   if (op->isLast()) {
      popEnabled();
      if (!m_hide) {
         if (!m_firstCol) {
            m_t << endl;
         }
         m_t << ".fi" << endl;
         m_t << ".PP" << endl;
         m_firstCol = true;
      }
   } else {
      if (!m_hide) {
         m_t << endl;
      }
   }
}
示例#12
0
void ManDocVisitor::visit(DocIncOperator *op)
{
  //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
  //    op->type(),op->isFirst(),op->isLast(),op->text().data());
  if (op->isFirst()) 
  {
    if (!m_hide)
    {
      if (!m_firstCol) m_t << endl;
      m_t << ".PP" << endl;
      m_t << ".nf" << endl;
    }
    pushEnabled();
    m_hide = TRUE;
  }
  if (op->type()!=DocIncOperator::Skip) 
  {
    popEnabled();
    if (!m_hide) parseCode(m_ci,op->context(),op->text().latin1(),op->isExample(),op->exampleFile());
    pushEnabled();
    m_hide=TRUE;
  }
  if (op->isLast())  
  {
    popEnabled();
    if (!m_hide)
    {
      if (!m_firstCol) m_t << endl;
      m_t << ".fi" << endl;
      m_t << ".PP" << endl;
      m_firstCol=TRUE;
    }
  }
  else
  {
    if (!m_hide) m_t << endl;
  }
}
示例#13
0
void XmlDocVisitor::visit(DocIncOperator *op)
{
  //printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
  //    op->type(),op->isFirst(),op->isLast(),op->text().data());
  if (op->isFirst()) 
  {
    if (!m_hide)
    {
      m_t << "<programlisting filename=\"" << op->includeFileName() << "\">";
    }
    pushEnabled();
    m_hide = TRUE;
  }
  SrcLangExt langExt = getLanguageFromFileName(m_langExt);
  if (op->type()!=DocIncOperator::Skip) 
  {
    popEnabled();
    if (!m_hide) 
    {
      Doxygen::parserManager->getParser(m_langExt)
                            ->parseCode(m_ci,op->context(),
                                        op->text(),langExt,op->isExample(),
                                        op->exampleFile());
    }
    pushEnabled();
    m_hide=TRUE;
  }
  if (op->isLast())  
  {
    popEnabled();
    if (!m_hide) m_t << "</programlisting>"; 
  }
  else
  {
    if (!m_hide) m_t << endl;
  }
}
示例#14
0
void DocbookDocVisitor::visitPre(DocImage *img)
{
  if (img->type()==DocImage::DocBook)
  {
    if (m_hide) return;
    m_t << endl;
    m_t << "    <figure>" << endl;
    m_t << "        <title>";
  }
  else
  {
    pushEnabled();
    m_hide=TRUE;
  }
}
示例#15
0
void LatexDocVisitor::visitPre(DocImage *img)
{
    if (img->type()==DocImage::Latex)
    {
        if (m_hide) return;
        QCString gfxName = img->name();
        if (gfxName.right(4)==".eps" || gfxName.right(4)==".pdf")
        {
            gfxName=gfxName.left(gfxName.length()-4);
        }

        visitPreStart(m_t,img->hasCaption(), gfxName, img->width(),  img->height());
    }
    else // other format -> skip
    {
        pushEnabled();
        m_hide=TRUE;
    }
}
示例#16
0
void DocbookDocVisitor::visitPre(DocImage *img)
{
  if (img->type()==DocImage::DocBook)
  {
    if (m_hide) return;
    m_t << endl;
    QCString baseName=img->name();
    int i;
    if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
    {
      baseName=baseName.right(baseName.length()-i-1);
    }
    visitPreStart(m_t, img -> hasCaption(), baseName, img -> width(), img -> height());
  }
  else
  {
    pushEnabled();
    m_hide=TRUE;
  }
}
void LatexDocVisitor::visitPre(DocImage *img)
{
   if (img->type() == DocImage::Latex) {
      if (m_hide) {
         return;
      }
   
      QString gfxName = img->name();

      if (gfxName.endsWith(".eps") || gfxName.endsWith(".pdf")) {
         gfxName = gfxName.left(gfxName.length() - 4);
      }

      visitPreStart(m_t, img->hasCaption(), gfxName, img->width(), img->height());

   } else { 
      // other format -> skip
      pushEnabled();
      m_hide = true;
   }
}
示例#18
0
void RTFDocVisitor::visitPre(DocImage *img)
{
  DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocImage)}\n");
  if (img->type()==DocImage::Rtf)
  {
    m_t << "\\par" << endl;
    m_t << "{" << endl;
    m_t << rtf_Style_Reset << endl;
    m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
    m_t << img->name();
    m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
    m_t << "}" << endl;
    m_lastIsPara=TRUE;
  }
  else // other format -> skip
  {
  }
  // hide caption since it is not supported at the moment
  pushEnabled();
  m_hide=TRUE;
}
示例#19
0
void LatexDocVisitor::visitPre(DocImage *img)
{
  if (img->type()==DocImage::Latex)
  {
    if (m_hide) return;
    if (img->hasCaption())
    {
      m_t << "\n\\begin{DoxyImage}\n";
    }
    else
    {
      m_t << "\n\\begin{DoxyImageNoCaption}\n"
             "  \\mbox{";
    }
    QCString gfxName = img->name();
    if (gfxName.right(4)==".eps" || gfxName.right(4)==".pdf")
    {
      gfxName=gfxName.left(gfxName.length()-4);
    }
    m_t << "\\includegraphics";
    if (!img->width().isEmpty())
    {
      m_t << "[width=" << img->width() << "]";
    }
    else if (!img->height().isEmpty())
    {
      m_t << "[height=" << img->height() << "]";
    }
    m_t << "{" << gfxName << "}";
    if (img->hasCaption())
    {
      m_t << "\n\\caption{";
    }
  }
  else // other format -> skip
  {
    pushEnabled();
    m_hide=TRUE;
  }
}