Skip to content

Commit c816d2b

Browse files
committed
Doxygen - minor cleanup of gnc-lot.h
1 parent e8d72ad commit c816d2b

File tree

1 file changed

+44
-34
lines changed

1 file changed

+44
-34
lines changed

libgnucash/engine/gnc-lot.h

+44-34
Original file line numberDiff line numberDiff line change
@@ -102,82 +102,92 @@ QofBook * gnc_lot_get_book (GNCLot *);
102102
void gnc_lot_begin_edit (GNCLot *lot);
103103
void gnc_lot_commit_edit (GNCLot *lot);
104104

105-
/** The gnc_lot_add_split() routine adds a split to this lot. Note
106-
* that *all* splits in a lot must also be in the same account.
107-
* Note that this routine adds the split unconditionally, with
105+
/** Adds a split to this lot.
106+
*
107+
* @note
108+
* - *All* splits in a lot must be in the same account.
109+
* - Splits are added unconditionally, with
108110
* no regard for the accounting policy. To enforce a particular
109111
* accounting policy, use the xaccSplitAssignToLot() routine
110112
* instead.
111113
*/
112114
void gnc_lot_add_split (GNCLot *, Split *);
115+
116+
/** Adds a split from this lot.
117+
*/
113118
void gnc_lot_remove_split (GNCLot *, Split *);
114119

115-
/** The gnc_lot_get_split_list() routine returns a GList of all the
116-
* splits in this lot. Do *not* free this list when done;
117-
* it is a pointer straight into the lots internal list. Do
118-
* *not* add to or remove from this list directly. Calling
119-
* either gnc_lot_add_split() or gnc_lot_remove_split() will
120-
* invalidate the returned pointer.
120+
/** Returns a list of all the splits in this lot.
121+
*
122+
* @returns GList
123+
*
124+
* This GList is owned and managed by the lot.
125+
* - Do *not* free it when done.
126+
* - Do *not* modify it directly
127+
* - Calls to either gnc_lot_add_split() or gnc_lot_remove_split()
128+
* will invalidate the returned pointer
121129
*/
122130
SplitList * gnc_lot_get_split_list (const GNCLot *);
123131
gint gnc_lot_count_splits (const GNCLot *);
124132

125-
/** The gnc_lot_get_account() routine returns the account with which
126-
* this lot is associated. */
133+
/** Returns the account with which this lot is associated.
134+
*/
127135
/*@ dependent @*/
128136
Account * gnc_lot_get_account (const GNCLot *);
129137
void gnc_lot_set_account(GNCLot*, Account*);
130138

131-
/** The gnc_lot_get_cached_invoice() routine returns the invoice with
132-
* which this lot is associated. */
139+
/** Returns the invoice with which this lot is associated.
140+
*/
133141
/*@ dependent @*/
134142
GncInvoice * gnc_lot_get_cached_invoice (const GNCLot *lot);
135143
void gnc_lot_set_cached_invoice(GNCLot* lot, GncInvoice *invoice);
136144

137-
/** The gnc_lot_get_balance() routine returns the balance of the lot.
138-
* The commodity in which this balance is expressed is the commodity
139-
* of the account. */
145+
/** Returns the lot balance.
146+
* This balance will be expressed in the lot account's commodity.
147+
*/
140148
gnc_numeric gnc_lot_get_balance (GNCLot *);
141149

142-
/** The gnc_lot_get_balance_before routine computes both the balance and
143-
* value in the lot considering only splits in transactions prior to the
144-
* one containing the given split or other splits in the same transaction.
150+
/** Computes both the balance and value in the lot considering only splits
151+
* in transactions prior to the one containing the given split or other
152+
* splits in the same transaction.
145153
* The first return value is the amount and the second is the value. */
146154
void gnc_lot_get_balance_before (const GNCLot *, const Split *,
147155
gnc_numeric *, gnc_numeric *);
148156

149-
/** The gnc_lot_is_closed() routine returns a boolean flag: is this
150-
* lot closed? A lot is closed if its balance is zero. This
151-
* routine is faster than using gnc_lot_get_balance() because
152-
* once the balance goes to zero, this fact is cached.
157+
/** Returns closed status of the given lot.
158+
* A lot is closed if its balance is zero. This
159+
* routine is faster than using gnc_lot_get_balance() because
160+
* once the balance goes to zero, this fact is cached.
161+
*
162+
* @returns boolean
153163
*/
154164
gboolean gnc_lot_is_closed (GNCLot *);
155165

156-
/** The gnc_lot_get_earliest_split() routine is a convenience routine
157-
* that helps identify the earliest date in the lot. It simply
158-
* loops over all of the splits in the lot, and returns the split
159-
* with the earliest split->transaction->date_posted. It may not
160-
* necessarily identify the lot opening split.
166+
/** Convenience routine to identify the earliest date in the lot.
167+
* It loops over all of the splits in the lot, and returns the split
168+
* with the earliest split->transaction->date_posted. It may not
169+
* necessarily identify the lot opening split.
161170
*/
162171
Split * gnc_lot_get_earliest_split (GNCLot *lot);
163172

164-
/** The gnc_lot_get_latest_split() routine is a convenience routine
165-
* that helps identify the date this lot was closed. It simply
166-
* loops over all of the splits in the lot, and returns the split
167-
* with the latest split->transaction->date_posted.
173+
/** Convenience routineto identify the date this lot was closed.
174+
* It simply loops over all of the splits in the lot, and returns
175+
* the split with the latest split->transaction->date_posted.
168176
*/
169177
Split * gnc_lot_get_latest_split (GNCLot *lot);
170178

171179
/** Reset closed flag so that it will be recalculated. */
172180
void gnc_lot_set_closed_unknown(GNCLot*);
173181

174-
/** Get and set the account title, or the account notes, or the marker. */
182+
/** @name Get/set the account title and notes.
183+
@{ */
175184
const char * gnc_lot_get_title (const GNCLot *);
176185
const char * gnc_lot_get_notes (const GNCLot *);
177186
void gnc_lot_set_title (GNCLot *, const char *);
178187
void gnc_lot_set_notes (GNCLot *, const char *);
188+
/** @} */
179189

180-
/** XXX: Document? */
190+
/** @todo Document this function ? */
181191
GNCLot * gnc_lot_make_default (Account * acc);
182192

183193
#define gnc_lot_get_guid(X) qof_entity_get_guid(QOF_INSTANCE(X))

0 commit comments

Comments
 (0)