LCOV - code coverage report
Current view: top level - libreoffice/autodoc/source/ary/info - all_tags.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 120 0.8 %
Date: 2012-12-27 Functions: 2 39 5.1 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include <precomp.h>
      21             : #include <ary/info/all_tags.hxx>
      22             : 
      23             : 
      24             : // NOT FULLY DEFINED SERVICES
      25             : #include <limits>
      26             : #include <ary/info/infodisp.hxx>
      27             : #include <adc_cl.hxx>
      28             : 
      29             : 
      30             : namespace ary
      31             : {
      32             : namespace info
      33             : {
      34             : 
      35             : 
      36             : 
      37             : //*****************************     StdTag      ***********************//
      38             : 
      39             : 
      40           0 : StdTag::StdTag( E_AtTagId i_eId )
      41             :     :   eId(i_eId),
      42             :         // aText,
      43           0 :         pNext(0)
      44             : {
      45           0 : }
      46             : 
      47             : bool
      48           0 : StdTag::Add_SpecialMeaningToken( const char *   ,
      49             :                                  intt           )
      50             : {
      51             :     // Does nothing
      52             : 
      53             :     // KORR_FUTURE
      54             :     //   Should be a logical exception:
      55             :     // csv_assert(false);
      56           0 :     return false;
      57             : }
      58             : 
      59             : UINT8
      60           0 : StdTag::NrOfSpecialMeaningTokens() const
      61             : {
      62           0 :     return 0;
      63             : }
      64             : 
      65             : AtTag *
      66           0 : StdTag::GetFollower()
      67             : {
      68           0 :     if (pNext != 0)
      69           0 :         return pNext->GetFollower();
      70           0 :     pNext = new StdTag(eId);
      71           0 :     return pNext;
      72             : }
      73             : 
      74             : void
      75           0 : StdTag::do_StoreAt( DocuDisplay &  o_rDisplay ) const
      76             : {
      77           0 :     o_rDisplay.Display_StdTag( *this );
      78           0 : }
      79             : 
      80             : DocuText *
      81           0 : StdTag::Text()
      82             : {
      83           0 :     return &aText;
      84             : }
      85             : 
      86             : 
      87             : 
      88             : //*****************************     BaseTag     ***********************//
      89             : 
      90           0 : BaseTag::BaseTag()
      91             :     :   // sBase
      92             :         // aText
      93           0 :         pNext(0)
      94             : {
      95           0 : }
      96             : 
      97             : bool
      98           0 : BaseTag::Add_SpecialMeaningToken( const char *      i_sText,
      99             :                                   intt              i_nNr )
     100             : {
     101           0 :     if ( i_nNr == 1 )
     102             :     {
     103           0 :         sBase.AssignText(i_sText,"::");
     104           0 :         return true;
     105             :     }
     106           0 :     return false;
     107             : }
     108             : 
     109             : const char *
     110           0 : BaseTag::Title() const
     111             : {
     112           0 :     return "Base Classes";
     113             : }
     114             : 
     115             : UINT8
     116           0 : BaseTag::NrOfSpecialMeaningTokens() const
     117             : {
     118           0 :     return 1;
     119             : }
     120             : 
     121             : AtTag *
     122           0 : BaseTag::GetFollower()
     123             : {
     124           0 :     if (pNext != 0)
     125           0 :         return pNext->GetFollower();
     126           0 :     pNext = new BaseTag;
     127           0 :     return pNext;
     128             : }
     129             : 
     130             : DocuText *
     131           0 : BaseTag::Text()
     132             : {
     133           0 :     return &aText;
     134             : }
     135             : 
     136             : 
     137             : 
     138             : //*****************************     ExceptionTag    ***********************//
     139             : 
     140           0 : ExceptionTag::ExceptionTag()
     141             :     :   // sException,
     142             :         // aText
     143           0 :         pNext(0)
     144             : {
     145           0 : }
     146             : 
     147             : bool
     148           0 : ExceptionTag::Add_SpecialMeaningToken( const char *     i_sText,
     149             :                                        intt             i_nNr )
     150             : {
     151           0 :     if ( i_nNr == 1 )
     152             :     {
     153           0 :         sException.AssignText(i_sText,"::");
     154           0 :         return true;
     155             :     }
     156           0 :     return false;
     157             : }
     158             : 
     159             : const char *
     160           0 : ExceptionTag::Title() const
     161             : {
     162           0 :     return "Thrown Exceptions";
     163             : }
     164             : 
     165             : UINT8
     166           0 : ExceptionTag::NrOfSpecialMeaningTokens() const
     167             : {
     168           0 :     return 1;
     169             : }
     170             : 
     171             : AtTag *
     172           0 : ExceptionTag::GetFollower()
     173             : {
     174           0 :     if (pNext != 0)
     175           0 :         return pNext->GetFollower();
     176           0 :     pNext = new ExceptionTag;
     177           0 :     return pNext;
     178             : }
     179             : 
     180             : DocuText *
     181           0 : ExceptionTag::Text()
     182             : {
     183           0 :     return &aText;
     184             : }
     185             : 
     186             : 
     187             : //*****************************     ImplementsTag   ***********************//
     188             : 
     189           0 : ImplementsTag::ImplementsTag()
     190             :     :   // sBase
     191             :         // aText
     192           0 :         pNext(0)
     193             : {
     194           0 : }
     195             : 
     196             : bool
     197           0 : ImplementsTag::Add_SpecialMeaningToken( const char *        i_sText,
     198             :                                         intt                i_nNr )
     199             : {
     200           0 :     if ( i_nNr == 1 )
     201             :     {
     202           0 :         sName.AssignText(i_sText,"::");
     203             :     }
     204             :     else
     205             :     {
     206           0 :         GetFollower()->Add_SpecialMeaningToken(i_sText,1);
     207             :     }
     208           0 :     return true;
     209             : }
     210             : 
     211             : const char *
     212           0 : ImplementsTag::Title() const
     213             : {
     214           0 :     return "Implements";
     215             : }
     216             : 
     217             : UINT8
     218           0 : ImplementsTag::NrOfSpecialMeaningTokens() const
     219             : {
     220           0 :     return std::numeric_limits<UINT8>::max();
     221             : }
     222             : 
     223             : AtTag *
     224           0 : ImplementsTag::GetFollower()
     225             : {
     226           0 :     if (pNext != 0)
     227           0 :         return pNext->GetFollower();
     228           0 :     pNext = new ImplementsTag;
     229           0 :     return pNext;
     230             : }
     231             : 
     232             : DocuText *
     233           0 : ImplementsTag::Text()
     234             : {
     235           0 :     return 0;
     236             : }
     237             : 
     238             : //*****************************     ParameterTag    ***********************//
     239             : 
     240             : 
     241           0 : ParameterTag::ParameterTag()
     242             :     :   // sName
     243             :         // aText
     244           0 :         pNext(0)
     245             : {
     246           0 : }
     247             : 
     248             : bool
     249           0 : ParameterTag::Add_SpecialMeaningToken( const char *     i_sText,
     250             :                                        intt             i_nNr )
     251             : {
     252           0 :     if ( i_nNr == 1 )
     253             :     {
     254           0 :         sName = i_sText;
     255           0 :         return true;
     256             :     }
     257           0 :     else if (i_nNr == 2)
     258             :     {
     259           0 :         uintt nLen = strlen(i_sText);
     260           0 :         if (*i_sText == '[' AND i_sText[nLen-1] == ']')
     261             :         {
     262           0 :             sValidRange = String(i_sText+1, nLen-2);
     263           0 :             return true;
     264             :         }
     265             :     }
     266           0 :     return false;
     267             : }
     268             : 
     269             : UINT8
     270           0 : ParameterTag::NrOfSpecialMeaningTokens() const
     271             : {
     272           0 :     return 2;
     273             : }
     274             : 
     275             : AtTag *
     276           0 : ParameterTag::GetFollower()
     277             : {
     278           0 :     if (pNext != 0)
     279           0 :         return pNext->GetFollower();
     280           0 :     return  pNext = new ParameterTag;
     281             : }
     282             : 
     283             : DocuText *
     284           0 : ParameterTag::Text()
     285             : {
     286           0 :     return &aText;
     287             : }
     288             : 
     289             : void
     290           0 : ParameterTag::do_StoreAt( DocuDisplay &  o_rDisplay ) const
     291             : {
     292           0 :     o_rDisplay.Display_ParameterTag( *this );
     293           0 : }
     294             : 
     295             : //*****************************     TemplateTag     ***********************//
     296             : 
     297             : 
     298           0 : TemplateTag::TemplateTag()
     299             :     :   // sName
     300             :         // aText
     301           0 :         pNext(0)
     302             : {
     303           0 : }
     304             : 
     305             : bool
     306           0 : TemplateTag::Add_SpecialMeaningToken( const char *      i_sText,
     307             :                                        intt             i_nNr )
     308             : {
     309           0 :     if ( i_nNr == 1 )
     310             :     {
     311           0 :         sName = i_sText;
     312           0 :         return true;
     313             :     }
     314           0 :     return false;
     315             : }
     316             : 
     317             : const char *
     318           0 : TemplateTag::Title() const
     319             : {
     320           0 :     return "Template Parameters";
     321             : }
     322             : 
     323             : UINT8
     324           0 : TemplateTag::NrOfSpecialMeaningTokens() const
     325             : {
     326           0 :     return 1;
     327             : }
     328             : 
     329             : AtTag *
     330           0 : TemplateTag::GetFollower()
     331             : {
     332           0 :     if (pNext != 0)
     333           0 :         return pNext->GetFollower();
     334           0 :     return  pNext = new TemplateTag;
     335             : }
     336             : 
     337             : void
     338           0 : TemplateTag::do_StoreAt( DocuDisplay &  o_rDisplay ) const
     339             : {
     340           0 :     o_rDisplay.Display_TemplateTag( *this );
     341           0 : }
     342             : 
     343             : 
     344             : DocuText *
     345           0 : TemplateTag::Text()
     346             : {
     347           0 :     return &aText;
     348             : }
     349             : 
     350             : }   // namespace info
     351           3 : }   // namespace ary
     352             : 
     353             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10