sharedpluralrules.h 1017 B

1234567891011121314151617181920212223242526272829303132333435
  1. // © 2016 and later: Unicode, Inc. and others.
  2. // License & terms of use: http://www.unicode.org/copyright.html
  3. /*
  4. ******************************************************************************
  5. * Copyright (C) 2014, International Business Machines
  6. * Corporation and others. All Rights Reserved.
  7. ******************************************************************************
  8. * sharedpluralrules.h
  9. */
  10. #ifndef __SHARED_PLURALRULES_H__
  11. #define __SHARED_PLURALRULES_H__
  12. #include "unicode/utypes.h"
  13. #include "sharedobject.h"
  14. U_NAMESPACE_BEGIN
  15. class PluralRules;
  16. class U_I18N_API SharedPluralRules : public SharedObject {
  17. public:
  18. SharedPluralRules(PluralRules *prToAdopt) : ptr(prToAdopt) { }
  19. virtual ~SharedPluralRules();
  20. const PluralRules *operator->() const { return ptr; }
  21. const PluralRules &operator*() const { return *ptr; }
  22. private:
  23. PluralRules *ptr;
  24. SharedPluralRules(const SharedPluralRules &);
  25. SharedPluralRules &operator=(const SharedPluralRules &);
  26. };
  27. U_NAMESPACE_END
  28. #endif