Skip to content

Commit e47fe05

Browse files
authored
Review/add the API doc (geo folder - part 2) (#1195)
In olp-cpp-sdk-core/include/olp/core/geo/coordinates&projection, review and modify the existing documentation and add missing descriptions so that we have fewer errors when building the API ref. Relates-To: OLPEDGE-1444 Signed-off-by: Halyna Dumych <[email protected]>
1 parent b17ab8f commit e47fe05

File tree

9 files changed

+348
-214
lines changed

9 files changed

+348
-214
lines changed

olp-cpp-sdk-core/include/olp/core/geo/tiling/HalfQuadTreeSubdivisionScheme.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ namespace olp {
2727
namespace geo {
2828

2929
/**
30-
* @brief Half-quadtree subdivision scheme.
30+
* @brief A subdivision scheme used to represent half quadtrees.
3131
*
32-
* Subdivides 0-th level tile into left and right parts; on other levels same as
33-
* quadtree.
32+
* Subdivides tiles of level 0 into left and right parts.
33+
* At other levels, it subdivides tiles into four equal-sized child tiles.
3434
*/
3535
class CORE_API HalfQuadTreeSubdivisionScheme final : public ISubdivisionScheme {
3636
public:

olp-cpp-sdk-core/include/olp/core/geo/tiling/ISubdivisionScheme.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,43 +28,44 @@ namespace olp {
2828
namespace geo {
2929

3030
/**
31-
* Abstract tiling subdivision scheme.
31+
* @brief An abstract tiling subdivision scheme.
3232
*/
3333
class CORE_API ISubdivisionScheme {
3434
public:
3535
virtual ~ISubdivisionScheme() = default;
3636

3737
/**
38-
* Check whether two schemes are equal.
38+
* @brief Checks whether two schemes are equal.
3939
*
40-
* @param[in] other Other scheme.
40+
* @param[in] other The other scheme.
4141
*
42-
* @return True if equal, false otherwise.
42+
* @return True if the schemes are equal; false otherwise.
4343
*/
4444
virtual bool IsEqualTo(const ISubdivisionScheme& other) const = 0;
4545

4646
/**
47-
* Get unique scheme name.
47+
* @brief Gets the unique scheme name.
4848
*
49-
* @return Scheme name.
49+
* @return The scheme name.
5050
*/
5151
virtual const std::string& GetName() const = 0;
5252

5353
/**
54-
* Get number of subtiles a tile splits into at given level.
54+
* @brief Gets the number of child tiles into which a tile splits
55+
* at a given level.
5556
*
56-
* @param[in] level Subdivision level.
57+
* @param[in] level The subdivision level.
5758
*
58-
* @return Horizontal and vertical number of subtiles (e.g. 2x2).
59+
* @return The horizontal and vertical numbers of child tiles (for example, 2 × 2).
5960
*/
6061
virtual math::Size2u GetSubdivisionAt(unsigned level) const = 0;
6162

6263
/**
63-
* Get size of a given level.
64+
* @brief Gets the size of a given level.
6465
*
65-
* @param[in] level Subdivision level.
66+
* @param[in] level The subdivision level.
6667
*
67-
* @return Horizontal and vertical number of tiles (e.g. 2^level x 2^level).
68+
* @return The horizontal and vertical numbers of tiles (for example, 2^level × 2^level).
6869
*/
6970
virtual math::Size2u GetLevelSize(unsigned level) const = 0;
7071
};

olp-cpp-sdk-core/include/olp/core/geo/tiling/ITilingScheme.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,24 @@
2424
namespace olp {
2525
namespace geo {
2626

27+
/**
28+
* @brief Represents how data is tiled.
29+
*/
2730
class CORE_API ITilingScheme {
2831
public:
2932
virtual ~ITilingScheme() = default;
33+
/**
34+
* @brief Gets the subdivision scheme.
35+
*
36+
* @return The subdivision scheme.
37+
*/
3038
virtual const ISubdivisionScheme& GetSubdivisionScheme() const = 0;
39+
40+
/**
41+
* @brief Gets the identity projection.
42+
*
43+
* @return The identity projection.
44+
*/
3145
virtual const IProjection& GetProjection() const = 0;
3246
};
3347

olp-cpp-sdk-core/include/olp/core/geo/tiling/QuadTreeSubdivisionScheme.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ namespace olp {
2727
namespace geo {
2828

2929
/**
30-
* @brief Quadtree subdivision scheme.
30+
* @brief A quadtree subdivision scheme.
3131
*
32-
* Subdivides tiles on all levels into four equal-sized subtiles.
32+
* Subdivides tiles at all levels into four equal-sized sub-tiles.
3333
*/
3434
class CORE_API QuadTreeSubdivisionScheme final : public ISubdivisionScheme {
3535
public:

olp-cpp-sdk-core/include/olp/core/geo/tiling/SubTiles.h

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,58 @@
2929
namespace olp {
3030
namespace geo {
3131

32+
/**
33+
* @brief A container of child tiles.
34+
*/
3235
class CORE_API SubTiles {
3336
friend class Iterator;
3437

3538
public:
39+
/// The tile key iterator.
3640
class Iterator : public std::iterator<std::forward_iterator_tag, TileKey> {
3741
friend class SubTiles;
3842

3943
public:
44+
/// An alias for the tile key.
4045
using ValueType = TileKey;
4146

47+
/**
48+
* @brief Gets a reference to the tile key.
49+
*
50+
* @return The reference to the tile key.
51+
*/
4252
ValueType operator*() const;
4353

54+
/**
55+
* @brief Iterates to the next tile.
56+
*
57+
* @return A reference to this.
58+
*/
4459
Iterator& operator++();
60+
61+
/**
62+
* @brief Iterates the specified number of times to the next tile.
63+
*
64+
* @return A new iterator.
65+
*/
4566
Iterator operator++(int);
4667

68+
/**
69+
* @brief Checks whether the iterators are equal.
70+
*
71+
* @param other The other iterator.
72+
*
73+
* @return True if the iterators are equal; false otherwise.
74+
*/
4775
bool operator==(Iterator& other) const;
76+
77+
/**
78+
* @brief Checks whether the iterators are not equal.
79+
*
80+
* @param other The other iterator.
81+
*
82+
* @return True if the iterators are not equal; false otherwise.
83+
*/
4884
bool operator!=(Iterator& other) const;
4985

5086
private:
@@ -54,20 +90,39 @@ class CORE_API SubTiles {
5490
std::uint32_t index_{0};
5591
};
5692

93+
/// An alias for the iterator.
5794
using ConstIterator = Iterator;
5895

96+
/**
97+
* @brief Creates a `SubTiles` instance.
98+
*
99+
* @param tile_key The tile key.
100+
* @param level The tile level.
101+
* @param mask The mask that indicates how many tiles should be included.
102+
*/
59103
SubTiles(const TileKey& tile_key, std::uint32_t level = 1,
60104
std::uint16_t mask = ~0);
61105

106+
/**
107+
* @brief Gets the size of the child tile.
108+
*
109+
* @return The size of the child tile.
110+
*/
62111
size_t Size() const;
63112

113+
/// Returns an iterator to the beginning.
64114
Iterator begin();
115+
/// Returns an iterator to the end.
65116
Iterator end();
66117

118+
/// Returns a constant iterator to the beginning.
67119
ConstIterator begin() const;
120+
/// Returns a constant iterator to the end.
68121
ConstIterator end() const;
69122

123+
/// Returns a constant iterator to the beginning of the container.
70124
ConstIterator cbegin() const;
125+
/// Returns a constant iterator to the end of the container.
71126
ConstIterator cend() const;
72127

73128
private:

0 commit comments

Comments
 (0)