OptionContainer.inl 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining
  5. * a copy of this software and associated documentation files
  6. * (curlpp), to deal in the Software without restriction,
  7. * including without limitation the rights to use, copy, modify, merge,
  8. * publish, distribute, sublicense, and/or sell copies of the Software,
  9. * and to permit persons to whom the Software is furnished to do so,
  10. * subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included
  13. * in all copies or substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  16. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  17. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  18. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  19. * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  20. * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  21. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22. */
  23. #ifndef OPTION_CONTAINER_INL
  24. #define OPTION_CONTAINER_INL
  25. namespace curlpp
  26. {
  27. namespace internal
  28. {
  29. template<class OptionType>
  30. OptionContainer<OptionType>::OptionContainer(typename OptionContainer<OptionType>::ParamType value)
  31. : mValue(value)
  32. {}
  33. template<class OptionType>
  34. OptionContainer<OptionType>::OptionContainer(OptionContainer<OptionType> & other)
  35. : mValue(other.mValue)
  36. {}
  37. template<class OptionType>
  38. void
  39. OptionContainer<OptionType>::setValue(typename OptionContainer<OptionType>::ParamType value)
  40. {
  41. mValue = value;
  42. }
  43. template<class OptionType>
  44. typename OptionContainer<OptionType>::ReturnType
  45. OptionContainer<OptionType>::getValue()
  46. {
  47. return mValue;
  48. }
  49. template<class OptionType>
  50. typename OptionContainer<OptionType>::HandleOptionType
  51. OptionContainer<OptionType>::getHandleOptionValue()
  52. {
  53. return mValue;
  54. }
  55. #endif
  56. } // namespace internal
  57. } // namespace curlpp