GnuCash  4.8a-134-g214de30c7+
gmock-qofbook.cpp
1 #include "gmock-qofbook.h"
2 
4 {
5  QofInstanceClass parent_class;
6 };
7 typedef struct _QofMockBookClass QofMockBookClass;
8 
9 G_DEFINE_TYPE(QofMockBook, qof_mockbook, QOF_TYPE_INSTANCE);
10 
11 static void
12 qof_mockbook_init (QofMockBook *inst)
13 {
14  // function is unused, initialization is done in the QofMockBook's C++ constructor
15 }
16 
17 static void
18 qof_mockbook_class_init(QofMockBookClass *klass)
19 {
20  // function is unused, class functions are defined in C++ code
21 }
22 
23 
24 GType qof_book_get_type(void)
25 {
26  return qof_mockbook_get_type();
27 }
28 
29 gboolean
31 {
32  SCOPED_TRACE("");
33  auto mockbook = qof_mockbook(book);
34  return mockbook ? mockbook->use_split_action_for_num_field() : FALSE;
35 }
36 
gboolean qof_book_use_split_action_for_num_field(const QofBook *book)
Returns TRUE if this book uses split action field as the 'Num' field, FALSE if it uses transaction nu...