/*---------------------------------------------------------------------------* Copyright (C) Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. *---------------------------------------------------------------------------*/ #ifndef NN_EC_PRICE_H_ #define NN_EC_PRICE_H_ #include #include namespace nn { namespace ec { //! @addtogroup nn_ec_class //! @{ /*! @brief Class for handling a price. @see Programming Manual */ class Price : public RootObject, private NonCopyable { public: NN_EC_DECLARE_ACCESSOR; NN_EC_DECLARE_IMPL; public: /*! @brief Specifies the maximum length of the discount description. */ static const size_t DISCOUNT_DESCRIPTION_LENGTH_MAX = 4000; /*! @brief Specifies the size of the discount description. */ static const size_t DISCOUNT_DESCRIPTION_SIZE = DISCOUNT_DESCRIPTION_LENGTH_MAX + 1; public: /*! @brief Instantiates an object. */ Price(); /*! @brief Destroys the object. */ ~Price(); /*! @brief Gets the price ID. @return Returns the price ID. */ s64 GetId() const; /*! @brief Gets the sale price. If the price is currently discounted, the discounted price is returned. @n Usually the regular price is returned. @return Returns the sale price. */ const Money* GetSalesPrice() const; /*! @brief Gets the regular price. @return Returns the regular price. */ const Money* GetRegularPrice() const; /*! @brief Determines whether it is discounted. @return Returns true if it is discounted, or false otherwise. */ bool IsDiscounted() const; /*! @brief Gets the discount price ID. @return Returns the discount price ID. */ s64 GetDiscountId() const; /*! @brief Gets the percentage of the discount when the price is discounted. @return Returns the percentage. */ s32 GetDiscountPercentage() const; /*! @brief Gets the discount description. If no description exists, an empty string is returned. @return Returns the discount description. */ const char* GetDiscountDescription() const; private: // NN_EC_IMPL; }; //! @} }} // namespace nn::ec #endif // NN_EC_PRICE_H_