SchemaUnique.hpp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2015 HPCC Systems®.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ############################################################################## */
  13. #ifndef _SCHEMA_UNIQUE_HPP_
  14. #define _SCHEMA_UNIQUE_HPP_
  15. #include "SchemaCommon.hpp"
  16. #include "SchemaKey.hpp"
  17. #include "jstring.hpp"
  18. namespace CONFIGURATOR
  19. {
  20. class CSchemaUnique;
  21. class CUnique : public CXSDNode
  22. {
  23. public:
  24. virtual ~CUnique()
  25. {
  26. }
  27. virtual void dump(::std::ostream &cout, unsigned int offset = 0) const;
  28. virtual void getDocumentation(::StringBuffer &strDoc) const
  29. {
  30. UNIMPLEMENTED;
  31. }
  32. virtual void populateEnvXPath(::StringBuffer strXPath, unsigned int index = 1)
  33. {
  34. UNIMPLEMENTED;
  35. }
  36. static CUnique* load(CXSDNodeBase* pParentNode, const ::IPropertyTree *pSchemaRoot, const char* xpath);
  37. GETTERSETTER(ID)
  38. GETTERSETTER(Name)
  39. protected:
  40. CUnique(CXSDNodeBase *pParentNode) : CXSDNode::CXSDNode(pParentNode, XSD_UNIQUE)
  41. {
  42. }
  43. };
  44. class CUniqueArray : public CIArrayOf<CUnique>, public CInterface, public CXSDNodeBase
  45. {
  46. public:
  47. virtual ~CUniqueArray()
  48. {
  49. }
  50. virtual void dump(::std::ostream& cout, unsigned int offset = 0) const;
  51. virtual void getDocumentation(::StringBuffer &strDoc) const
  52. {
  53. UNIMPLEMENTED;
  54. }
  55. virtual void populateEnvXPath(::StringBuffer strXPath, unsigned int index = 1)
  56. {
  57. UNIMPLEMENTED;
  58. }
  59. virtual void loadXMLFromEnvXml(const IPropertyTree *pEnvTree)
  60. {
  61. UNIMPLEMENTED;
  62. }
  63. static CUniqueArray* load(CXSDNodeBase* pParentNode, const IPropertyTree *pSchemaRoot, const char* xpath);
  64. protected:
  65. CUniqueArray(CXSDNodeBase* pParentNode = NULL) : CXSDNodeBase::CXSDNodeBase(pParentNode, XSD_UNIQUE_ARRAY)
  66. {
  67. }
  68. };
  69. }
  70. #endif // _SCHEMA_UNIQUE_HPP_