Skip to content

Commit d1310ab

Browse files
committed
Update Doxygen documentation for C API functions
1 parent 5643636 commit d1310ab

File tree

4 files changed

+50
-8
lines changed

4 files changed

+50
-8
lines changed

source/pdal/capi/Pipeline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ namespace pdal
118118
* to free these data structures.
119119
*
120120
* @param pipeline The pipeline
121-
* @return A pointer to a point view collection or nullptr if no point views are available
121+
* @return A pointer to a point view collection or NULL if no point views are available
122122
*/
123123
PDAL_C_API PDALPointViewIteratorPtr PDALGetPointViews(PDALPipelinePtr pipeline);
124124

source/pdal/capi/PointLayout.h

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,57 @@ namespace pdal
2424

2525
PDAL_C_API size_t PDALGetDimTypeInterpretationName(PDALDimType dim, char *name, size_t size);
2626

27+
/**
28+
* Returns the list of dimension types used by the provided `layout`.
29+
*
30+
* @return The caller obtains ownership of the data structure referenced by the returned pointer.
31+
* Use PDALDisposeDimTypeList from DimTypes.h to free the data structure.
32+
*
33+
* @param layout A pointer to the layout
34+
* @return A pointer to the dimension type list or NULL if the `layout` is NULL
35+
*/
2736
PDAL_C_API PDALDimTypeListPtr PDALGetPointLayoutDimTypes(PDALPointLayoutPtr layout);
2837

2938
PDAL_C_API void PDALDisposeDimTypeList(PDALDimTypeListPtr types);
3039

40+
/**
41+
* Finds the dimension type identified by the provided `name` in a `layout`.
42+
*
43+
* @param layout A pointer to the layout
44+
* @param name The name of the dimension type, i.e., the string representation of its ID
45+
* @return The matching dimension type,
46+
* or the value returned by PDALGetInvalidDimType from DimTypes.h if none found
47+
*/
3148
PDAL_C_API PDALDimType PDALFindDimType(PDALPointLayoutPtr layout, const char *name);
3249

50+
/**
51+
* Returns the byte size of a dimension type value within a `layout`.
52+
*
53+
* @param layout A pointer to the layout
54+
* @param name The dimension type name
55+
* @return The dimension type byte size,
56+
* or zero if the layout is NULL, the name is NULL, or the dimension type is not found
57+
*/
3358
PDAL_C_API size_t PDALGetDimSize(PDALPointLayoutPtr layout, const char *name);
3459

60+
/**
61+
* Returns the byte offset of a dimension type within a `layout`.
62+
*
63+
* @param layout A pointer to the layout
64+
* @param name The dimension type name
65+
* @return The dimension type offset,
66+
* or zero if the layout is NULL, the name is NULL, or the dimension type is not found
67+
*/
3568
PDAL_C_API size_t PDALGetDimPackedOffset(PDALPointLayoutPtr layout, const char *name);
3669

70+
/**
71+
* Returns the byte size of a point in the provided `layout`.
72+
*
73+
* @param layout A pointer to the layout
74+
* @return The byte size of a point in the layout or zero if the layout is NULL
75+
*/
3776
PDAL_C_API size_t PDALGetPointSize(PDALPointLayoutPtr layout);
3877

39-
4078
#ifdef __cplusplus
4179
} // extern "C"
4280
} // namespace capi

source/pdal/capi/PointView.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace pdal
4141
* @see pdal::PointView::size
4242
*
4343
* @param view The point view
44-
* @return The number of points
44+
* @return The number of points or zero if `view` is NULL
4545
*/
4646
PDAL_C_API uint64_t PDALGetPointViewSize(PDALPointViewPtr view);
4747

@@ -51,7 +51,7 @@ namespace pdal
5151
* @see pdal::PointView::empty
5252
*
5353
* @param view The point view
54-
* @return Whether the point view is empty
54+
* @return Whether the point view is empty or `false` if `view` is NULL
5555
*/
5656
PDAL_C_API bool PDALIsPointViewEmpty(PDALPointViewPtr view);
5757

@@ -61,7 +61,7 @@ namespace pdal
6161
* @see pdal::PointView::makeNew
6262
*
6363
* @param view The original point view
64-
* @return A pointer to the new point view
64+
* @return A pointer to the new point view or NULL if `view` is NULL
6565
*/
6666
PDAL_C_API PDALPointViewPtr PDALClonePointView(PDALPointViewPtr view);
6767

@@ -74,6 +74,7 @@ namespace pdal
7474
* @param[out] proj The buffer used to hold the resulting proj4 projection string
7575
* @param size The size of the proj4 projection string buffer
7676
* @return The size of the resulting proj4 projection string
77+
* or zero if the `proj` buffer is NULL or the buffer `size` is zero
7778
*/
7879
PDAL_C_API size_t PDALGetPointViewProj4(PDALPointViewPtr view, char *proj, size_t size);
7980

@@ -86,6 +87,7 @@ namespace pdal
8687
* @param size The size of the wkt projection string buffer
8788
* @param pretty Whether to enhance the formatting of the resulting WKT string
8889
* @return The size of the resulting WKT projection string
90+
* or zero if the `wkt` buffer is NULL or the buffer `size` is zero
8991
*/
9092
PDAL_C_API size_t PDALGetPointViewWkt(PDALPointViewPtr view, char *wkt, size_t size, bool pretty);
9193

@@ -96,7 +98,7 @@ namespace pdal
9698
* layout pointed by the return value. Do not free the returned pointer.
9799
*
98100
* @param view The point view
99-
* @return The point layout
101+
* @return The point layout or NULL if `view` is NULL
100102
*/
101103
PDAL_C_API PDALPointLayoutPtr PDALGetPointViewLayout(PDALPointViewPtr view);
102104

@@ -109,7 +111,8 @@ namespace pdal
109111
* @param dims List of dimensions to retrieve
110112
* @param idx Index of point to get
111113
* @param[out] buf Pointer to buffer to fill
112-
* @return The size of the point stored in `buf`
114+
* @return The size of the retrieved point
115+
* or zero if view` is NULL, `dims` is NULL, `buf` is NULL, or `idx` is out of bounds
113116
*/
114117
PDAL_C_API size_t PDALGetPackedPoint(PDALPointViewPtr view, PDALDimTypeListPtr dims, PDALPointId idx, char *buf);
115118

@@ -123,6 +126,7 @@ namespace pdal
123126
* @param idx Index of point to get
124127
* @param[out] buf Pointer to buffer to fill
125128
* @return The size of the points stored in `buf`
129+
* or zero if `view` is NULL, `dims` is NULL, or `buf` is NULL
126130
*/
127131
PDAL_C_API uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeListPtr dims, char *buf);
128132

source/pdal/capi/PointViewIterator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace pdal
3636
* Returns whether another point view is available in the provided iterator.
3737
*
3838
* @param itr A pointer to the point view iterator
39-
* @return Whether another point view is available
39+
* @return Whether another point view is available or `false` if `itr` is NULL
4040
*/
4141
PDAL_C_API bool PDALHasNextPointView(PDALPointViewIteratorPtr itr);
4242

0 commit comments

Comments
 (0)