summaryrefslogtreecommitdiff
path: root/autodoc/source/ary/info
diff options
context:
space:
mode:
Diffstat (limited to 'autodoc/source/ary/info')
-rw-r--r--autodoc/source/ary/info/all_dts.cxx105
-rw-r--r--autodoc/source/ary/info/all_tags.cxx569
-rw-r--r--autodoc/source/ary/info/ci_attag.cxx93
-rw-r--r--autodoc/source/ary/info/ci_text.cxx71
-rw-r--r--autodoc/source/ary/info/makefile.mk60
5 files changed, 898 insertions, 0 deletions
diff --git a/autodoc/source/ary/info/all_dts.cxx b/autodoc/source/ary/info/all_dts.cxx
new file mode 100644
index 000000000000..7dfbf737538b
--- /dev/null
+++ b/autodoc/source/ary/info/all_dts.cxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include <ary/info/all_dts.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+#include <ary/info/infodisp.hxx>
+
+
+namespace ary
+{
+namespace info
+{
+
+
+void
+DT_Text::do_StoreAt( DocuDisplay & o_rDisplay ) const
+{
+ o_rDisplay.Display_DT_Text(*this);
+}
+
+bool
+DT_Text::inq_IsWhite() const
+{
+ return false;
+}
+
+void
+DT_MaybeLink::do_StoreAt( DocuDisplay & o_rDisplay ) const
+{
+ o_rDisplay.Display_DT_MaybeLink(*this);
+}
+
+bool
+DT_MaybeLink::inq_IsWhite() const
+{
+ return false;
+}
+
+void
+DT_Whitespace::do_StoreAt( DocuDisplay & o_rDisplay ) const
+{
+ o_rDisplay.Display_DT_Whitespace(*this);
+}
+
+bool
+DT_Whitespace::inq_IsWhite() const
+{
+ return true;
+}
+
+void
+DT_Eol::do_StoreAt( DocuDisplay & o_rDisplay ) const
+{
+ o_rDisplay.Display_DT_Eol(*this);
+}
+
+bool
+DT_Eol::inq_IsWhite() const
+{
+ return true;
+}
+
+void
+DT_Xml::do_StoreAt( DocuDisplay & o_rDisplay ) const
+{
+ o_rDisplay.Display_DT_Xml(*this);
+}
+
+bool
+DT_Xml::inq_IsWhite() const
+{
+ return false;
+}
+
+
+} // namespace info
+} // namespace ary
+
diff --git a/autodoc/source/ary/info/all_tags.cxx b/autodoc/source/ary/info/all_tags.cxx
new file mode 100644
index 000000000000..76d8192690ff
--- /dev/null
+++ b/autodoc/source/ary/info/all_tags.cxx
@@ -0,0 +1,569 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include <ary/info/all_tags.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+#include <limits>
+#include <ary/info/infodisp.hxx>
+#include <adc_cl.hxx>
+
+
+namespace ary
+{
+namespace info
+{
+
+
+
+//***************************** StdTag ***********************//
+
+
+StdTag::StdTag( E_AtTagId i_eId )
+ : eId(i_eId),
+ // aText,
+ pNext(0)
+{
+}
+
+bool
+StdTag::Add_SpecialMeaningToken( const char * ,
+ intt )
+{
+ // Does nothing
+
+ // KORR_FUTURE
+ // Should be a logical exception:
+ // csv_assert(false);
+ return false;
+}
+
+UINT8
+StdTag::NrOfSpecialMeaningTokens() const
+{
+ return 0;
+}
+
+AtTag *
+StdTag::GetFollower()
+{
+ if (pNext != 0)
+ return pNext->GetFollower();
+ pNext = new StdTag(eId);
+ return pNext;
+}
+
+void
+StdTag::do_StoreAt( DocuDisplay & o_rDisplay ) const
+{
+ o_rDisplay.Display_StdTag( *this );
+}
+
+DocuText *
+StdTag::Text()
+{
+ return &aText;
+}
+
+
+
+//***************************** BaseTag ***********************//
+
+BaseTag::BaseTag()
+ : // sBase
+ // aText
+ pNext(0)
+{
+}
+
+bool
+BaseTag::Add_SpecialMeaningToken( const char * i_sText,
+ intt i_nNr )
+{
+ if ( i_nNr == 1 )
+ {
+ sBase.AssignText(i_sText,"::");
+ return true;
+ }
+ return false;
+}
+
+const char *
+BaseTag::Title() const
+{
+ return "Base Classes";
+}
+
+UINT8
+BaseTag::NrOfSpecialMeaningTokens() const
+{
+ return 1;
+}
+
+AtTag *
+BaseTag::GetFollower()
+{
+ if (pNext != 0)
+ return pNext->GetFollower();
+ pNext = new BaseTag;
+ return pNext;
+}
+
+DocuText *
+BaseTag::Text()
+{
+ return &aText;
+}
+
+
+
+//***************************** ExceptionTag ***********************//
+
+ExceptionTag::ExceptionTag()
+ : // sException,
+ // aText
+ pNext(0)
+{
+}
+
+bool
+ExceptionTag::Add_SpecialMeaningToken( const char * i_sText,
+ intt i_nNr )
+{
+ if ( i_nNr == 1 )
+ {
+ sException.AssignText(i_sText,"::");
+ return true;
+ }
+ return false;
+}
+
+const char *
+ExceptionTag::Title() const
+{
+ return "Thrown Exceptions";
+}
+
+UINT8
+ExceptionTag::NrOfSpecialMeaningTokens() const
+{
+ return 1;
+}
+
+AtTag *
+ExceptionTag::GetFollower()
+{
+ if (pNext != 0)
+ return pNext->GetFollower();
+ pNext = new ExceptionTag;
+ return pNext;
+}
+
+DocuText *
+ExceptionTag::Text()
+{
+ return &aText;
+}
+
+
+//***************************** ImplementsTag ***********************//
+
+ImplementsTag::ImplementsTag()
+ : // sBase
+ // aText
+ pNext(0)
+{
+}
+
+bool
+ImplementsTag::Add_SpecialMeaningToken( const char * i_sText,
+ intt i_nNr )
+{
+ if ( i_nNr == 1 )
+ {
+ sName.AssignText(i_sText,"::");
+ }
+ else
+ {
+ GetFollower()->Add_SpecialMeaningToken(i_sText,1);
+ }
+ return true;
+}
+
+const char *
+ImplementsTag::Title() const
+{
+ return "Implements";
+}
+
+UINT8
+ImplementsTag::NrOfSpecialMeaningTokens() const
+{
+ return std::numeric_limits<UINT8>::max();
+}
+
+AtTag *
+ImplementsTag::GetFollower()
+{
+ if (pNext != 0)
+ return pNext->GetFollower();
+ pNext = new ImplementsTag;
+ return pNext;
+}
+
+DocuText *
+ImplementsTag::Text()
+{
+ return 0;
+}
+
+
+//***************************** KeywordTag ***********************//
+
+
+KeywordTag::KeywordTag()
+// : sKeys
+{
+}
+
+bool
+KeywordTag::Add_SpecialMeaningToken( const char * i_sText,
+ intt )
+{
+ sKeys.push_back(i_sText);
+ return true;
+}
+
+const char *
+KeywordTag::Title() const
+{
+ return "Keywords";
+}
+
+UINT8
+KeywordTag::NrOfSpecialMeaningTokens() const
+{
+ return std::numeric_limits<UINT8>::max();
+}
+
+AtTag *
+KeywordTag::GetFollower()
+{
+ return this;
+}
+
+DocuText *
+KeywordTag::Text()
+{
+ return 0;
+}
+
+
+
+//***************************** ParameterTag ***********************//
+
+
+ParameterTag::ParameterTag()
+ : // sName
+ // aText
+ pNext(0)
+{
+}
+
+bool
+ParameterTag::Add_SpecialMeaningToken( const char * i_sText,
+ intt i_nNr )
+{
+ if ( i_nNr == 1 )
+ {
+ sName = i_sText;
+ return true;
+ }
+ else if (i_nNr == 2)
+ {
+ uintt nLen = strlen(i_sText);
+ if (*i_sText == '[' AND i_sText[nLen-1] == ']')
+ {
+ sValidRange = String(i_sText+1, nLen-2);
+ return true;
+ }
+ }
+ return false;
+}
+
+UINT8
+ParameterTag::NrOfSpecialMeaningTokens() const
+{
+ return 2;
+}
+
+AtTag *
+ParameterTag::GetFollower()
+{
+ if (pNext != 0)
+ return pNext->GetFollower();
+ return pNext = new ParameterTag;
+}
+
+DocuText *
+ParameterTag::Text()
+{
+ return &aText;
+}
+
+void
+ParameterTag::do_StoreAt( DocuDisplay & o_rDisplay ) const
+{
+ o_rDisplay.Display_ParameterTag( *this );
+}
+
+
+
+//***************************** SeeTag ***********************//
+
+
+
+SeeTag::SeeTag()
+// : sReferences
+{
+}
+
+bool
+SeeTag::Add_SpecialMeaningToken( const char * i_sText,
+ intt )
+{
+ static QualifiedName aNull_;
+ sReferences.push_back(aNull_);
+ sReferences.back().AssignText(i_sText,"::");
+
+ return true;
+}
+
+const char *
+SeeTag::Title() const
+{
+ return "See Also";
+}
+
+UINT8
+SeeTag::NrOfSpecialMeaningTokens() const
+{
+ return std::numeric_limits<UINT8>::max();
+}
+
+AtTag *
+SeeTag::GetFollower()
+{
+ return this;
+}
+
+void
+SeeTag::do_StoreAt( DocuDisplay & o_rDisplay ) const
+{
+ o_rDisplay.Display_SeeTag( *this );
+}
+
+DocuText *
+SeeTag::Text()
+{
+ return 0;
+}
+
+
+
+//***************************** TemplateTag ***********************//
+
+
+TemplateTag::TemplateTag()
+ : // sName
+ // aText
+ pNext(0)
+{
+}
+
+bool
+TemplateTag::Add_SpecialMeaningToken( const char * i_sText,
+ intt i_nNr )
+{
+ if ( i_nNr == 1 )
+ {
+ sName = i_sText;
+ return true;
+ }
+ return false;
+}
+
+const char *
+TemplateTag::Title() const
+{
+ return "Template Parameters";
+}
+
+UINT8
+TemplateTag::NrOfSpecialMeaningTokens() const
+{
+ return 1;
+}
+
+AtTag *
+TemplateTag::GetFollower()
+{
+ if (pNext != 0)
+ return pNext->GetFollower();
+ return pNext = new TemplateTag;
+}
+
+void
+TemplateTag::do_StoreAt( DocuDisplay & o_rDisplay ) const
+{
+ o_rDisplay.Display_TemplateTag( *this );
+}
+
+
+DocuText *
+TemplateTag::Text()
+{
+ return &aText;
+}
+
+
+//***************************** LabelTag ***********************//
+
+
+
+LabelTag::LabelTag()
+ : sLabel()
+{
+}
+
+bool
+LabelTag::Add_SpecialMeaningToken( const char * i_sText,
+ intt i_nNr )
+{
+ if ( i_nNr == 1 AND sLabel.length() == 0 )
+ {
+ sLabel = i_sText;
+ return true;
+ }
+ // KORR_FUTURE
+// else // Throw exception because of double label.
+ return false;
+}
+
+const char *
+LabelTag::Title() const
+{
+ return "Label";
+}
+
+UINT8
+LabelTag::NrOfSpecialMeaningTokens() const
+{
+ return 1;
+}
+
+AtTag *
+LabelTag::GetFollower()
+{
+ return this;
+}
+
+DocuText *
+LabelTag::Text()
+{
+ return 0;
+}
+
+
+//***************************** SinceTag ***********************//
+
+SinceTag::SinceTag()
+ : sVersion()
+{
+}
+
+bool
+SinceTag::Add_SpecialMeaningToken( const char * i_sText,
+ intt )
+{
+ const char cCiphersend = '9' + 1;
+ if ( sVersion.empty()
+ AND NOT csv::in_range('0', *i_sText, cCiphersend)
+ AND autodoc::CommandLine::Get_().DoesTransform_SinceTag() )
+ {
+ return true;
+ }
+
+ if (sVersion.empty())
+ {
+ sVersion = i_sText;
+ }
+ else
+ {
+ StreamLock sHelp(100);
+ sVersion = sHelp() << sVersion << " " << i_sText << c_str;
+ }
+
+ return true;
+}
+
+const char *
+SinceTag::Title() const
+{
+ return "Label";
+}
+
+UINT8
+SinceTag::NrOfSpecialMeaningTokens() const
+{
+ return UINT8(-1);
+}
+
+AtTag *
+SinceTag::GetFollower()
+{
+ return this;
+}
+
+void
+SinceTag::do_StoreAt( DocuDisplay & o_rDisplay ) const
+{
+ o_rDisplay.Display_SinceTag( *this );
+}
+
+DocuText *
+SinceTag::Text()
+{
+ return 0;
+}
+
+
+} // namespace info
+} // namespace ary
+
diff --git a/autodoc/source/ary/info/ci_attag.cxx b/autodoc/source/ary/info/ci_attag.cxx
new file mode 100644
index 000000000000..e9afb6e106f7
--- /dev/null
+++ b/autodoc/source/ary/info/ci_attag.cxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include <ary/info/ci_attag.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+#include <ary/info/all_dts.hxx>
+#include <ary/info/ci_text.hxx>
+
+
+namespace ary
+{
+namespace info
+{
+
+void
+AtTag::Set_HtmlUseInDocuText( bool i_bUseIt )
+{
+ DocuText * pText = Text();
+ if ( pText != 0 )
+ pText->Set_HtmlUse(i_bUseIt);
+}
+
+void
+AtTag::Add_Token( const char * i_sText )
+{
+ DocuText * pText = Text();
+ if (pText != 0)
+ pText->Add_Token( *new DT_Text(i_sText) );
+}
+
+void
+AtTag::Add_PotentialLink( const char * i_sText,
+ bool i_bIsGlobal,
+ bool i_bIsFunction )
+{
+ DocuText * pText = Text();
+ if (pText != 0)
+ pText->Add_Token( *new DT_MaybeLink(i_sText, i_bIsGlobal, i_bIsFunction) );
+}
+
+void
+AtTag::Add_Whitespace( UINT8 i_nLength )
+{
+ DocuText * pText = Text();
+ if (pText != 0)
+ pText->Add_Token( *new DT_Whitespace(i_nLength) );
+}
+
+void
+AtTag::Add_Eol()
+{
+ DocuText * pText = Text();
+ if (pText != 0)
+ pText->Add_Token( *new DT_Eol );
+}
+
+void
+AtTag::do_StoreAt( DocuDisplay & ) const
+{
+ // Dummy
+}
+
+} // namespace info
+} // namespace ary
+
+
diff --git a/autodoc/source/ary/info/ci_text.cxx b/autodoc/source/ary/info/ci_text.cxx
new file mode 100644
index 000000000000..12710c5fd53b
--- /dev/null
+++ b/autodoc/source/ary/info/ci_text.cxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include <ary/info/ci_text.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+#include <ary/info/all_dts.hxx>
+
+
+namespace ary
+{
+namespace info
+{
+
+DocuText::DocuText()
+ : bUsesHtml(false)
+{
+}
+
+DocuText::~DocuText()
+{
+ for ( TokenList::iterator iter = aTokens.begin();
+ iter != aTokens.end();
+ ++iter )
+ {
+ delete (*iter);
+ }
+}
+
+void
+DocuText::StoreAt( DocuDisplay & o_rDisplay ) const
+{
+ ary::info::DocuText::TokenList::const_iterator itEnd = aTokens.end();
+ for ( ary::info::DocuText::TokenList::const_iterator it = aTokens.begin();
+ it != itEnd;
+ ++it )
+ {
+ (*it)->StoreAt(o_rDisplay);
+ }
+}
+
+} // namespace info
+} // namespace ary
+
+
diff --git a/autodoc/source/ary/info/makefile.mk b/autodoc/source/ary/info/makefile.mk
new file mode 100644
index 000000000000..0c507ba3f4fe
--- /dev/null
+++ b/autodoc/source/ary/info/makefile.mk
@@ -0,0 +1,60 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..$/..
+
+PRJNAME=autodoc
+TARGET=ary_info
+
+
+
+# --- Settings -----------------------------------------------------
+
+ENABLE_EXCEPTIONS=true
+PRJINC=$(PRJ)$/source
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
+
+
+
+# --- Files --------------------------------------------------------
+
+
+OBJFILES= \
+ $(OBJ)$/all_dts.obj \
+ $(OBJ)$/all_tags.obj \
+ $(OBJ)$/ci_attag.obj \
+ $(OBJ)$/ci_text.obj
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+
+