You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
3.0 KiB

  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /*
  18. * $Id: Xlat_Formatter.hpp 470094 2006-11-01 20:41:30Z amassari $
  19. */
  20. // ---------------------------------------------------------------------------
  21. // This is a simple abstract API that each formatter must provide. This is
  22. // how the main program logic calls out with all of the needed information
  23. // and events needed to create the output.
  24. // ---------------------------------------------------------------------------
  25. class XlatFormatter
  26. {
  27. public :
  28. // -----------------------------------------------------------------------
  29. // Public Constructors and Destructor
  30. // -----------------------------------------------------------------------
  31. virtual ~XlatFormatter()
  32. {
  33. }
  34. // -----------------------------------------------------------------------
  35. // Virtual formatter interface
  36. // -----------------------------------------------------------------------
  37. virtual void endDomain
  38. (
  39. const XMLCh* const domainName
  40. , const unsigned int msgCount
  41. ) = 0;
  42. virtual void endMsgType
  43. (
  44. const MsgTypes type
  45. ) = 0;
  46. virtual void endOutput() = 0;
  47. virtual void nextMessage
  48. (
  49. const XMLCh* const msgText
  50. , const XMLCh* const msgId
  51. , const unsigned int messageId
  52. , const unsigned int curId
  53. ) = 0;
  54. virtual void startDomain
  55. (
  56. const XMLCh* const domainName
  57. , const XMLCh* const nameSpace
  58. ) = 0;
  59. virtual void startMsgType
  60. (
  61. const MsgTypes type
  62. ) = 0;
  63. virtual void startOutput
  64. (
  65. const XMLCh* const locale
  66. , const XMLCh* const outPath
  67. ) = 0;
  68. protected :
  69. // -----------------------------------------------------------------------
  70. // Hidden constructors
  71. // -----------------------------------------------------------------------
  72. XlatFormatter()
  73. {
  74. }
  75. private :
  76. // -----------------------------------------------------------------------
  77. // Unimplemented constructors and operators
  78. // -----------------------------------------------------------------------
  79. XlatFormatter(const XlatFormatter&);
  80. void operator=(const XlatFormatter&);
  81. };