LCOV - code coverage report
Current view: top level - /usr/include/xsd/cxx/tree/bits - literals.ixx (source / functions) Coverage Total Hit
Test: mu2edaq.info.cleaned Lines: 0.0 % 20 0
Test Date: 2026-07-30 01:56:44 Functions: 0.0 % 10 0

            Line data    Source code
       1              : // file      : xsd/cxx/tree/bits/literals.ixx
       2              : // copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC
       3              : // license   : GNU GPL v2 + exceptions; see accompanying LICENSE file
       4              : 
       5              : #ifndef XSD_CXX_TREE_BITS_LITERALS_IXX
       6              : #define XSD_CXX_TREE_BITS_LITERALS_IXX
       7              : 
       8              : // The char versions of the following literals are required even
       9              : // if we are using wchar_t as the character type.
      10              : //
      11              : namespace xsd
      12              : {
      13              :   namespace cxx
      14              :   {
      15              :     namespace tree
      16              :     {
      17              :       namespace bits
      18              :       {
      19              :         //
      20              :         //
      21              :         template<>
      22              :         inline const char*
      23              :         positive_inf<char> ()
      24              :         {
      25              :           return "INF";
      26              :         }
      27              : 
      28              :         template<>
      29              :         inline const char*
      30              :         negative_inf<char> ()
      31              :         {
      32              :           return "-INF";
      33              :         }
      34              : 
      35              :         template<>
      36              :         inline const char*
      37              :         nan<char> ()
      38              :         {
      39              :           return "NaN";
      40              :         }
      41              :       }
      42              :     }
      43              :   }
      44              : }
      45              : 
      46              : #endif // XSD_CXX_TREE_BITS_LITERALS_IXX
      47              : 
      48              : 
      49              : #if defined(XSD_CXX_TREE_USE_CHAR) || !defined(XSD_CXX_TREE_USE_WCHAR)
      50              : 
      51              : #ifndef XSD_CXX_TREE_BITS_LITERALS_IXX_CHAR
      52              : #define XSD_CXX_TREE_BITS_LITERALS_IXX_CHAR
      53              : 
      54              : namespace xsd
      55              : {
      56              :   namespace cxx
      57              :   {
      58              :     namespace tree
      59              :     {
      60              :       namespace bits
      61              :       {
      62              :         //
      63              :         //
      64              :         template<>
      65              :         inline const char*
      66              :         true_<char> ()
      67              :         {
      68              :           return "true";
      69              :         }
      70              : 
      71              :         template<>
      72              :         inline const char*
      73              :         one<char> ()
      74              :         {
      75              :           return "1";
      76              :         }
      77              : 
      78              :         //
      79              :         //
      80              :         template<>
      81              :         inline const char*
      82              :         not_present<char> ()
      83              :         {
      84              :           return "<not present>";
      85              :         }
      86              : 
      87              :         //
      88              :         //
      89              :         template <>
      90              :         inline const char*
      91              :         xml_schema<char> ()
      92              :         {
      93              :           return "http://www.w3.org/2001/XMLSchema";
      94              :         }
      95              : 
      96              :         //
      97              :         //
      98              :         template <>
      99              :         inline const char*
     100              :         any_type<char> ()
     101              :         {
     102              :           return "anyType";
     103              :         }
     104              : 
     105              :         template <>
     106              :         inline const char*
     107              :         any_simple_type<char> ()
     108              :         {
     109              :           return "anySimpleType";
     110              :         }
     111              : 
     112              :         template <>
     113              :         inline const char*
     114              :         string<char> ()
     115              :         {
     116              :           return "string";
     117              :         }
     118              : 
     119              :         template <>
     120              :         inline const char*
     121              :         normalized_string<char> ()
     122              :         {
     123              :           return "normalizedString";
     124              :         }
     125              : 
     126              :         template <>
     127              :         inline const char*
     128              :         token<char> ()
     129              :         {
     130              :           return "token";
     131              :         }
     132              : 
     133              :         template <>
     134              :         inline const char*
     135              :         name<char> ()
     136              :         {
     137              :           return "Name";
     138              :         }
     139              : 
     140              :         template <>
     141              :         inline const char*
     142              :         nmtoken<char> ()
     143              :         {
     144              :           return "NMTOKEN";
     145              :         }
     146              : 
     147              :         template <>
     148              :         inline const char*
     149              :         nmtokens<char> ()
     150              :         {
     151              :           return "NMTOKENS";
     152              :         }
     153              : 
     154              :         template <>
     155              :         inline const char*
     156              :         ncname<char> ()
     157              :         {
     158              :           return "NCName";
     159              :         }
     160              : 
     161              :         template <>
     162              :         inline const char*
     163              :         language<char> ()
     164              :         {
     165              :           return "language";
     166              :         }
     167              : 
     168              : 
     169              :         template <>
     170              :         inline const char*
     171              :         id<char> ()
     172              :         {
     173              :           return "ID";
     174              :         }
     175              : 
     176              :         template <>
     177              :         inline const char*
     178              :         idref<char> ()
     179              :         {
     180              :           return "IDREF";
     181              :         }
     182              : 
     183              :         template <>
     184              :         inline const char*
     185              :         idrefs<char> ()
     186              :         {
     187              :           return "IDREFS";
     188              :         }
     189              : 
     190              :         template <>
     191              :         inline const char*
     192              :         any_uri<char> ()
     193              :         {
     194              :           return "anyURI";
     195              :         }
     196              : 
     197              :         template <>
     198              :         inline const char*
     199              :         qname<char> ()
     200              :         {
     201              :           return "QName";
     202              :         }
     203              : 
     204              :         template <>
     205              :         inline const char*
     206              :         base64_binary<char> ()
     207              :         {
     208              :           return "base64Binary";
     209              :         }
     210              : 
     211              :         template <>
     212              :         inline const char*
     213              :         hex_binary<char> ()
     214              :         {
     215              :           return "hexBinary";
     216              :         }
     217              : 
     218              :         template <>
     219              :         inline const char*
     220              :         date<char> ()
     221              :         {
     222              :           return "date";
     223              :         }
     224              : 
     225              :         template <>
     226              :         inline const char*
     227              :         date_time<char> ()
     228              :         {
     229              :           return "dateTime";
     230              :         }
     231              : 
     232              :         template <>
     233              :         inline const char*
     234              :         duration<char> ()
     235              :         {
     236              :           return "duration";
     237              :         }
     238              : 
     239              :         template <>
     240              :         inline const char*
     241              :         gday<char> ()
     242              :         {
     243              :           return "gDay";
     244              :         }
     245              : 
     246              :         template <>
     247              :         inline const char*
     248              :         gmonth<char> ()
     249              :         {
     250              :           return "gMonth";
     251              :         }
     252              : 
     253              :         template <>
     254              :         inline const char*
     255              :         gmonth_day<char> ()
     256              :         {
     257              :           return "gMonthDay";
     258              :         }
     259              : 
     260              :         template <>
     261              :         inline const char*
     262              :         gyear<char> ()
     263              :         {
     264              :           return "gYear";
     265              :         }
     266              : 
     267              :         template <>
     268              :         inline const char*
     269              :         gyear_month<char> ()
     270              :         {
     271              :           return "gYearMonth";
     272              :         }
     273              : 
     274              :         template <>
     275              :         inline const char*
     276              :         time<char> ()
     277              :         {
     278              :           return "time";
     279              :         }
     280              : 
     281              :         template <>
     282              :         inline const char*
     283              :         entity<char> ()
     284              :         {
     285              :           return "ENTITY";
     286              :         }
     287              : 
     288              :         template <>
     289              :         inline const char*
     290              :         entities<char> ()
     291              :         {
     292              :           return "ENTITIES";
     293              :         }
     294              : 
     295              :         template <>
     296              :         inline const char*
     297              :         gday_prefix<char> ()
     298              :         {
     299              :           return "---";
     300              :         }
     301              : 
     302              :         template <>
     303              :         inline const char*
     304              :         gmonth_prefix<char> ()
     305              :         {
     306              :           return "--";
     307              :         }
     308              : 
     309              :         //
     310              :         //
     311              :         template <>
     312              :         inline const char*
     313            0 :         ex_error_error<char> ()
     314              :         {
     315            0 :           return " error: ";
     316              :         }
     317              : 
     318              :         template <>
     319              :         inline const char*
     320            0 :         ex_error_warning<char> ()
     321              :         {
     322            0 :           return " warning: ";
     323              :         }
     324              : 
     325              :         template <>
     326              :         inline const char*
     327            0 :         ex_parsing_msg<char> ()
     328              :         {
     329            0 :           return "instance document parsing failed";
     330              :         }
     331              : 
     332              :         template <>
     333              :         inline const char*
     334              :         ex_eel_expected<char> ()
     335              :         {
     336              :           return "expected element '";
     337              :         }
     338              : 
     339              :         template <>
     340              :         inline const char*
     341            0 :         ex_uel_expected<char> ()
     342              :         {
     343            0 :           return "expected element '";
     344              :         }
     345              : 
     346              :         template <>
     347              :         inline const char*
     348            0 :         ex_uel_instead<char> ()
     349              :         {
     350            0 :           return "' instead of '";
     351              :         }
     352              : 
     353              :         template <>
     354              :         inline const char*
     355            0 :         ex_uel_unexpected<char> ()
     356              :         {
     357            0 :           return "unexpected element '";
     358              :         }
     359              : 
     360              :         template <>
     361              :         inline const char*
     362            0 :         ex_eat_expected<char> ()
     363              :         {
     364            0 :           return "expected attribute '";
     365              :         }
     366              : 
     367              :         template <>
     368              :         inline const char*
     369              :         ex_uen_unexpected<char> ()
     370              :         {
     371              :           return "unexpected enumerator '";
     372              :         }
     373              : 
     374              :         template <>
     375              :         inline const char*
     376            0 :         ex_etc_msg<char> ()
     377              :         {
     378            0 :           return "expected text content";
     379              :         }
     380              : 
     381              :         template <>
     382              :         inline const char*
     383              :         ex_nti_no_type_info<char> ()
     384              :         {
     385              :           return "no type information available for type '";
     386              :         }
     387              : 
     388              :         template <>
     389              :         inline const char*
     390              :         ex_nei_no_element_info<char> ()
     391              :         {
     392              :           return "no parsing or serialization information available for "
     393              :             "element '";
     394              :         }
     395              :         template <>
     396              :         inline const char*
     397              :         ex_nd_type<char> ()
     398              :         {
     399              :           return "type '";
     400              :         }
     401              : 
     402              :         template <>
     403              :         inline const char*
     404              :         ex_nd_not_derived<char> ()
     405              :         {
     406              :           return "' is not derived from '";
     407              :         }
     408              : 
     409              :         template <>
     410              :         inline const char*
     411              :         ex_di_id<char> ()
     412              :         {
     413              :           return "ID '";
     414              :         }
     415              : 
     416              :         template <>
     417              :         inline const char*
     418              :         ex_di_already_exist<char> ()
     419              :         {
     420              :           return "' already exist";
     421              :         }
     422              : 
     423              :         template <>
     424              :         inline const char*
     425            0 :         ex_serialization_msg<char> ()
     426              :         {
     427            0 :           return "serialization failed";
     428              :         }
     429              : 
     430              :         template <>
     431              :         inline const char*
     432              :         ex_npm_no_mapping<char> ()
     433              :         {
     434              :           return "no mapping provided for namespace prefix '";
     435              :         }
     436              : 
     437              :         template <>
     438              :         inline const char*
     439            0 :         ex_bounds_msg<char> ()
     440              :         {
     441            0 :           return "buffer boundary rules have been violated";
     442              :         }
     443              :       }
     444              :     }
     445              :   }
     446              : }
     447              : 
     448              : #endif // XSD_CXX_TREE_BITS_LITERALS_IXX_CHAR
     449              : #endif // XSD_CXX_TREE_USE_CHAR
     450              : 
     451              : 
     452              : #if defined(XSD_CXX_TREE_USE_WCHAR) || !defined(XSD_CXX_TREE_USE_CHAR)
     453              : 
     454              : #ifndef XSD_CXX_TREE_BITS_LITERALS_IXX_WCHAR
     455              : #define XSD_CXX_TREE_BITS_LITERALS_IXX_WCHAR
     456              : 
     457              : namespace xsd
     458              : {
     459              :   namespace cxx
     460              :   {
     461              :     namespace tree
     462              :     {
     463              :       namespace bits
     464              :       {
     465              :         //
     466              :         //
     467              :         template<>
     468              :         inline const wchar_t*
     469              :         true_<wchar_t> ()
     470              :         {
     471              :           return L"true";
     472              :         }
     473              : 
     474              :         template<>
     475              :         inline const wchar_t*
     476              :         one<wchar_t> ()
     477              :         {
     478              :           return L"1";
     479              :         }
     480              : 
     481              :         //
     482              :         //
     483              :         template<>
     484              :         inline const wchar_t*
     485              :         positive_inf<wchar_t> ()
     486              :         {
     487              :           return L"INF";
     488              :         }
     489              : 
     490              :         template<>
     491              :         inline const wchar_t*
     492              :         negative_inf<wchar_t> ()
     493              :         {
     494              :           return L"-INF";
     495              :         }
     496              : 
     497              :         template<>
     498              :         inline const wchar_t*
     499              :         nan<wchar_t> ()
     500              :         {
     501              :           return L"NaN";
     502              :         }
     503              : 
     504              :         //
     505              :         //
     506              :         template<>
     507              :         inline const wchar_t*
     508              :         not_present<wchar_t> ()
     509              :         {
     510              :           return L"<not present>";
     511              :         }
     512              : 
     513              :         //
     514              :         //
     515              :         template <>
     516              :         inline const wchar_t*
     517              :         xml_schema<wchar_t> ()
     518              :         {
     519              :           return L"http://www.w3.org/2001/XMLSchema";
     520              :         }
     521              : 
     522              :         //
     523              :         //
     524              :         template <>
     525              :         inline const wchar_t*
     526              :         any_type<wchar_t> ()
     527              :         {
     528              :           return L"anyType";
     529              :         }
     530              : 
     531              :         template <>
     532              :         inline const wchar_t*
     533              :         any_simple_type<wchar_t> ()
     534              :         {
     535              :           return L"anySimpleType";
     536              :         }
     537              : 
     538              :         template <>
     539              :         inline const wchar_t*
     540              :         string<wchar_t> ()
     541              :         {
     542              :           return L"string";
     543              :         }
     544              : 
     545              :         template <>
     546              :         inline const wchar_t*
     547              :         normalized_string<wchar_t> ()
     548              :         {
     549              :           return L"normalizedString";
     550              :         }
     551              : 
     552              :         template <>
     553              :         inline const wchar_t*
     554              :         token<wchar_t> ()
     555              :         {
     556              :           return L"token";
     557              :         }
     558              : 
     559              :         template <>
     560              :         inline const wchar_t*
     561              :         name<wchar_t> ()
     562              :         {
     563              :           return L"Name";
     564              :         }
     565              : 
     566              :         template <>
     567              :         inline const wchar_t*
     568              :         nmtoken<wchar_t> ()
     569              :         {
     570              :           return L"NMTOKEN";
     571              :         }
     572              : 
     573              :         template <>
     574              :         inline const wchar_t*
     575              :         nmtokens<wchar_t> ()
     576              :         {
     577              :           return L"NMTOKENS";
     578              :         }
     579              : 
     580              :         template <>
     581              :         inline const wchar_t*
     582              :         ncname<wchar_t> ()
     583              :         {
     584              :           return L"NCName";
     585              :         }
     586              : 
     587              :         template <>
     588              :         inline const wchar_t*
     589              :         language<wchar_t> ()
     590              :         {
     591              :           return L"language";
     592              :         }
     593              : 
     594              : 
     595              :         template <>
     596              :         inline const wchar_t*
     597              :         id<wchar_t> ()
     598              :         {
     599              :           return L"ID";
     600              :         }
     601              : 
     602              :         template <>
     603              :         inline const wchar_t*
     604              :         idref<wchar_t> ()
     605              :         {
     606              :           return L"IDREF";
     607              :         }
     608              : 
     609              :         template <>
     610              :         inline const wchar_t*
     611              :         idrefs<wchar_t> ()
     612              :         {
     613              :           return L"IDREFS";
     614              :         }
     615              : 
     616              :         template <>
     617              :         inline const wchar_t*
     618              :         any_uri<wchar_t> ()
     619              :         {
     620              :           return L"anyURI";
     621              :         }
     622              : 
     623              :         template <>
     624              :         inline const wchar_t*
     625              :         qname<wchar_t> ()
     626              :         {
     627              :           return L"QName";
     628              :         }
     629              : 
     630              :         template <>
     631              :         inline const wchar_t*
     632              :         base64_binary<wchar_t> ()
     633              :         {
     634              :           return L"base64Binary";
     635              :         }
     636              : 
     637              :         template <>
     638              :         inline const wchar_t*
     639              :         hex_binary<wchar_t> ()
     640              :         {
     641              :           return L"hexBinary";
     642              :         }
     643              : 
     644              :         template <>
     645              :         inline const wchar_t*
     646              :         date<wchar_t> ()
     647              :         {
     648              :           return L"date";
     649              :         }
     650              : 
     651              :         template <>
     652              :         inline const wchar_t*
     653              :         date_time<wchar_t> ()
     654              :         {
     655              :           return L"dateTime";
     656              :         }
     657              : 
     658              :         template <>
     659              :         inline const wchar_t*
     660              :         duration<wchar_t> ()
     661              :         {
     662              :           return L"duration";
     663              :         }
     664              : 
     665              :         template <>
     666              :         inline const wchar_t*
     667              :         gday<wchar_t> ()
     668              :         {
     669              :           return L"gDay";
     670              :         }
     671              : 
     672              :         template <>
     673              :         inline const wchar_t*
     674              :         gmonth<wchar_t> ()
     675              :         {
     676              :           return L"gMonth";
     677              :         }
     678              : 
     679              :         template <>
     680              :         inline const wchar_t*
     681              :         gmonth_day<wchar_t> ()
     682              :         {
     683              :           return L"gMonthDay";
     684              :         }
     685              : 
     686              :         template <>
     687              :         inline const wchar_t*
     688              :         gyear<wchar_t> ()
     689              :         {
     690              :           return L"gYear";
     691              :         }
     692              : 
     693              :         template <>
     694              :         inline const wchar_t*
     695              :         gyear_month<wchar_t> ()
     696              :         {
     697              :           return L"gYearMonth";
     698              :         }
     699              : 
     700              :         template <>
     701              :         inline const wchar_t*
     702              :         time<wchar_t> ()
     703              :         {
     704              :           return L"time";
     705              :         }
     706              : 
     707              :         template <>
     708              :         inline const wchar_t*
     709              :         entity<wchar_t> ()
     710              :         {
     711              :           return L"ENTITY";
     712              :         }
     713              : 
     714              :         template <>
     715              :         inline const wchar_t*
     716              :         entities<wchar_t> ()
     717              :         {
     718              :           return L"ENTITIES";
     719              :         }
     720              : 
     721              :         template <>
     722              :         inline const wchar_t*
     723              :         gday_prefix<wchar_t> ()
     724              :         {
     725              :           return L"---";
     726              :         }
     727              : 
     728              :         template <>
     729              :         inline const wchar_t*
     730              :         gmonth_prefix<wchar_t> ()
     731              :         {
     732              :           return L"--";
     733              :         }
     734              : 
     735              :         //
     736              :         //
     737              :         template <>
     738              :         inline const wchar_t*
     739              :         ex_error_error<wchar_t> ()
     740              :         {
     741              :           return L" error: ";
     742              :         }
     743              : 
     744              :         template <>
     745              :         inline const wchar_t*
     746              :         ex_error_warning<wchar_t> ()
     747              :         {
     748              :           return L" warning: ";
     749              :         }
     750              : 
     751              :         template <>
     752              :         inline const wchar_t*
     753              :         ex_parsing_msg<wchar_t> ()
     754              :         {
     755              :           return L"instance document parsing failed";
     756              :         }
     757              : 
     758              :         template <>
     759              :         inline const wchar_t*
     760              :         ex_eel_expected<wchar_t> ()
     761              :         {
     762              :           return L"expected element '";
     763              :         }
     764              : 
     765              :         template <>
     766              :         inline const wchar_t*
     767              :         ex_uel_expected<wchar_t> ()
     768              :         {
     769              :           return L"expected element '";
     770              :         }
     771              : 
     772              :         template <>
     773              :         inline const wchar_t*
     774              :         ex_uel_instead<wchar_t> ()
     775              :         {
     776              :           return L"' instead of '";
     777              :         }
     778              : 
     779              :         template <>
     780              :         inline const wchar_t*
     781              :         ex_uel_unexpected<wchar_t> ()
     782              :         {
     783              :           return L"unexpected element '";
     784              :         }
     785              : 
     786              :         template <>
     787              :         inline const wchar_t*
     788              :         ex_eat_expected<wchar_t> ()
     789              :         {
     790              :           return L"expected attribute '";
     791              :         }
     792              : 
     793              :         template <>
     794              :         inline const wchar_t*
     795              :         ex_uen_unexpected<wchar_t> ()
     796              :         {
     797              :           return L"unexpected enumerator '";
     798              :         }
     799              : 
     800              :         template <>
     801              :         inline const wchar_t*
     802              :         ex_etc_msg<wchar_t> ()
     803              :         {
     804              :           return L"expected text content";
     805              :         }
     806              : 
     807              :         template <>
     808              :         inline const wchar_t*
     809              :         ex_nti_no_type_info<wchar_t> ()
     810              :         {
     811              :           return L"no type information available for type '";
     812              :         }
     813              : 
     814              :         template <>
     815              :         inline const wchar_t*
     816              :         ex_nei_no_element_info<wchar_t> ()
     817              :         {
     818              :           return L"no parsing or serialization information available for "
     819              :             L"element '";
     820              :         }
     821              :         template <>
     822              :         inline const wchar_t*
     823              :         ex_nd_type<wchar_t> ()
     824              :         {
     825              :           return L"type '";
     826              :         }
     827              : 
     828              :         template <>
     829              :         inline const wchar_t*
     830              :         ex_nd_not_derived<wchar_t> ()
     831              :         {
     832              :           return L"' is not derived from '";
     833              :         }
     834              : 
     835              :         template <>
     836              :         inline const wchar_t*
     837              :         ex_di_id<wchar_t> ()
     838              :         {
     839              :           return L"ID '";
     840              :         }
     841              : 
     842              :         template <>
     843              :         inline const wchar_t*
     844              :         ex_di_already_exist<wchar_t> ()
     845              :         {
     846              :           return L"' already exist";
     847              :         }
     848              : 
     849              :         template <>
     850              :         inline const wchar_t*
     851              :         ex_serialization_msg<wchar_t> ()
     852              :         {
     853              :           return L"serialization failed";
     854              :         }
     855              : 
     856              :         template <>
     857              :         inline const wchar_t*
     858              :         ex_npm_no_mapping<wchar_t> ()
     859              :         {
     860              :           return L"no mapping provided for namespace prefix '";
     861              :         }
     862              : 
     863              :         template <>
     864              :         inline const wchar_t*
     865              :         ex_bounds_msg<wchar_t> ()
     866              :         {
     867              :           return L"buffer boundary rules have been violated";
     868              :         }
     869              :       }
     870              :     }
     871              :   }
     872              : }
     873              : 
     874              : #endif // XSD_CXX_TREE_BITS_LITERALS_IXX_WCHAR
     875              : #endif // XSD_CXX_TREE_USE_WCHAR
        

Generated by: LCOV version 2.0-1