instigate::geometry::concept::rectangle::interface< T > Struct Template Reference
Interface for the concept Rectangle Concept.
More...
#include <concept_rectangle.hpp>
List of all members.
Detailed Description
template<typename T>
struct instigate::geometry::concept::rectangle::interface< T >
Interface for the concept Rectangle Concept.
This is a "non-intrusive" interface for the rectangle. Any type, that conceptually can be treated as a rectangle can become a model of this concept, if this interface is provided for it by specializing this template structure with that type and providing definitions for associated types and basic operations.
- Refinement of:
- instigate::stl::concept::default_constructible
- instigate::stl::concept::assignable
- Models:
Member Typedef Documentation
Typename for the coordinate type.
This must be a numeric type.
Member Function Documentation
Returns the bottom coordinate (y1) of the rectangle.
- Parameters:
-
- Postcondition:
- get_bottom(p) <= get_top(p)
Returns the left coordinate (x1) of the rectangle.
- Parameters:
-
- Postcondition:
- get_left(p) <= get_right(p)
Returns the right coordinate (x2) of the rectangle.
- Parameters:
-
- Postcondition:
- get_left(p) <= get_right(p)
Returns top coordinate (y2) of the rectangle.
- Parameters:
-
- Postcondition:
- get_bottom(p) <= get_top(p)
Sets the bottom coordinate (y1) of the rectangle.
- Parameters:
-
| p | - an lvalue of type T |
| v | - the new value for the bottom coordinate |
- Postcondition:
- get_bottom(p) == v
- Complexity
- O(1)
Sets the left coordinate (x1) of the rectangle.
- Parameters:
-
| p | - an lvalue of type T |
| v | - the new value for the left coordinate |
- Postcondition:
- get_left(p) == v
- Complexity
- O(1)
Sets the right coordinate (x2) of the rectangle.
- Parameters:
-
| p | - an lvalue of type T |
| v | - the new value for the right coordinate of p |
- Postcondition:
- get_right(p) == v
- Complexity
- O(1)
Sets the top coordinate of the rectangle.
- Parameters:
-
| p | - an lvalue of type T |
| v | - the new value for the top coordinate of p |
- Postcondition:
- get_top(p) == v
- Complexity
- O(1)
The documentation for this struct was generated from the following file: