@@ -49,10 +49,31 @@ * * If the value is not range-sized, @ref OFOutOfRangeException is thrown. */ @property (readonly, nonatomic) of_range_t rangeValue; +/*! + * @brief The value as a point. + * + * If the value is not point-sized, @ref OFOutOfRangeException is thrown. + */ +@property (readonly, nonatomic) of_point_t pointValue; + +/*! + * @brief The value as a dimension. + * + * If the value is not dimension-sized, @ref OFOutOfRangeException is thrown. + */ +@property (readonly, nonatomic) of_dimension_t dimensionValue; + +/*! + * @brief The value as a rectangle. + * + * If the value is not rectangle-sized, @ref OFOutOfRangeException is thrown. + */ +@property (readonly, nonatomic) of_rectangle_t rectangleValue; + /*! * @brief Creates a new, autorelease OFValue with the specified bytes of the * specified type. * * @param bytes The bytes containing the value @@ -90,10 +111,36 @@ * @param range The range the OFValue should contain * @return A new, autoreleased OFValue */ + (instancetype)valueWithRange: (of_range_t)range; +/*! + * @brief Creates a new, autoreleased OFValue containing the specified point. + * + * @param point The point the OFValue should contain + * @return A new, autoreleased OFValue + */ ++ (instancetype)valueWithPoint: (of_point_t)point; + +/*! + * @brief Creates a new, autoreleased OFValue containing the specified + * dimension. + * + * @param dimension The dimension the OFValue should contain + * @return A new, autoreleased OFValue + */ ++ (instancetype)valueWithDimension: (of_dimension_t)dimension; + +/*! + * @brief Creates a new, autoreleased OFValue containing the specified + * rectangle. + * + * @param rectangle The rectangle the OFValue should contain + * @return A new, autoreleased OFValue + */ ++ (instancetype)valueWithRectangle: (of_rectangle_t)rectangle; + /*! * @brief Initializes an already allocated OFValue with the specified bytes of * the specified type. * * @param bytes The bytes containing the value @@ -133,10 +180,37 @@ * @param range The range the OFValue should contain * @return An initialized OFValue */ - (instancetype)initWithRange: (of_range_t)range; +/*! + * @brief Initializes an already allocated OFValue containing the specified + * point. + * + * @param point The point the OFValue should contain + * @return An initialized OFValue + */ +- (instancetype)initWithPoint: (of_point_t)point; + +/*! + * @brief Initializes an already allocated OFValue containing the specified + * dimension. + * + * @param dimension The dimension the OFValue should contain + * @return An initialized OFValue + */ +- (instancetype)initWithDimension: (of_dimension_t)dimension; + +/*! + * @brief Initializes an already allocated OFValue containing the specified + * rectangle. + * + * @param rectangle The rectangle the OFValue should contain + * @return An initialized OFValue + */ +- (instancetype)initWithRectangle: (of_rectangle_t)rectangle; + /*! * @brief Gets the value. * * If the specified size does not match, this raises an * @ref OFOutOfRangeException.