@@ -102,82 +102,92 @@ QofBook * gnc_lot_get_book (GNCLot *);
102
102
void gnc_lot_begin_edit (GNCLot * lot );
103
103
void gnc_lot_commit_edit (GNCLot * lot );
104
104
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
108
110
* no regard for the accounting policy. To enforce a particular
109
111
* accounting policy, use the xaccSplitAssignToLot() routine
110
112
* instead.
111
113
*/
112
114
void gnc_lot_add_split (GNCLot * , Split * );
115
+
116
+ /** Adds a split from this lot.
117
+ */
113
118
void gnc_lot_remove_split (GNCLot * , Split * );
114
119
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
121
129
*/
122
130
SplitList * gnc_lot_get_split_list (const GNCLot * );
123
131
gint gnc_lot_count_splits (const GNCLot * );
124
132
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
+ */
127
135
/*@ dependent @*/
128
136
Account * gnc_lot_get_account (const GNCLot * );
129
137
void gnc_lot_set_account (GNCLot * , Account * );
130
138
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
+ */
133
141
/*@ dependent @*/
134
142
GncInvoice * gnc_lot_get_cached_invoice (const GNCLot * lot );
135
143
void gnc_lot_set_cached_invoice (GNCLot * lot , GncInvoice * invoice );
136
144
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
+ */
140
148
gnc_numeric gnc_lot_get_balance (GNCLot * );
141
149
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.
145
153
* The first return value is the amount and the second is the value. */
146
154
void gnc_lot_get_balance_before (const GNCLot * , const Split * ,
147
155
gnc_numeric * , gnc_numeric * );
148
156
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
153
163
*/
154
164
gboolean gnc_lot_is_closed (GNCLot * );
155
165
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.
161
170
*/
162
171
Split * gnc_lot_get_earliest_split (GNCLot * lot );
163
172
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.
168
176
*/
169
177
Split * gnc_lot_get_latest_split (GNCLot * lot );
170
178
171
179
/** Reset closed flag so that it will be recalculated. */
172
180
void gnc_lot_set_closed_unknown (GNCLot * );
173
181
174
- /** Get and set the account title, or the account notes, or the marker. */
182
+ /** @name Get/set the account title and notes.
183
+ @{ */
175
184
const char * gnc_lot_get_title (const GNCLot * );
176
185
const char * gnc_lot_get_notes (const GNCLot * );
177
186
void gnc_lot_set_title (GNCLot * , const char * );
178
187
void gnc_lot_set_notes (GNCLot * , const char * );
188
+ /** @} */
179
189
180
- /** XXX: Document? */
190
+ /** @todo Document this function ? */
181
191
GNCLot * gnc_lot_make_default (Account * acc );
182
192
183
193
#define gnc_lot_get_guid (X ) qof_entity_get_guid(QOF_INSTANCE(X))
0 commit comments