OPL_Row.3 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. .TH "OPL::Row" 3 "Tue Aug 9 2022" "openPilotLog" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. OPL::Row \- The \fBRow\fP class provides an interface for retreiving and submitting entries from the database\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <row\&.h>\fP
  11. .PP
  12. Inherited by \fBOPL::AircraftEntry\fP, \fBOPL::AirportEntry\fP, \fBOPL::CurrencyEntry\fP, \fBOPL::FlightEntry\fP, \fBOPL::PilotEntry\fP, \fBOPL::SimulatorEntry\fP, and \fBOPL::TailEntry\fP\&.
  13. .SS "Public Member Functions"
  14. .in +1c
  15. .ti -1c
  16. .RI "\fBRow\fP (\fBOPL::DbTable\fP table_name, int row_id, const RowData_T &row_data)"
  17. .br
  18. .ti -1c
  19. .RI "\fBRow\fP (\fBOPL::DbTable\fP table_name, int row_id)"
  20. .br
  21. .ti -1c
  22. .RI "\fBRow\fP (\fBOPL::DbTable\fP table_name)"
  23. .br
  24. .ti -1c
  25. .RI "\fBRow\fP (const \fBRow\fP &)=default"
  26. .br
  27. .ti -1c
  28. .RI "\fBRow\fP & \fBoperator=\fP (const \fBRow\fP &)=default"
  29. .br
  30. .ti -1c
  31. .RI "RowData_T \fBgetData\fP () const"
  32. .br
  33. .ti -1c
  34. .RI "void \fBsetData\fP (const RowData_T &value)"
  35. .br
  36. .ti -1c
  37. .RI "int \fBgetRowId\fP () const"
  38. .br
  39. .ti -1c
  40. .RI "void \fBsetRowId\fP (int value)"
  41. .br
  42. .ti -1c
  43. .RI "\fBOPL::DbTable\fP \fBgetTable\fP () const"
  44. .br
  45. .ti -1c
  46. .RI "const QString \fBgetTableName\fP () const"
  47. .br
  48. .ti -1c
  49. .RI "const QString \fBgetPosition\fP () const"
  50. .br
  51. .ti -1c
  52. .RI "bool \fBisValid\fP () const"
  53. .br
  54. .ti -1c
  55. .RI "\fBoperator QString\fP () const"
  56. .br
  57. .RI "operator QString can be used for printing debug information to stdout "
  58. .in -1c
  59. .SS "Protected Attributes"
  60. .in +1c
  61. .ti -1c
  62. .RI "bool \fBhasData\fP"
  63. .br
  64. .ti -1c
  65. .RI "bool \fBvalid\fP = true"
  66. .br
  67. .in -1c
  68. .SH "Detailed Description"
  69. .PP
  70. The \fBRow\fP class provides an interface for retreiving and submitting entries from the database\&.
  71. The \fBRow\fP class is a base class and when instantiated, the appropriate subclass should be used\&.
  72. .PP
  73. The database holds all the data related to the logbook in different tables\&. Each of these tables is composed of rows\&. Each row has different columns and each column contains the data\&. As such, an entry can be thought of as a row in the database\&. The row class encapsulates the data contained in each row\&.
  74. .PP
  75. A row is uniquely identified by its position in the database, consisting of the table name (QString) and the row id (int)\&. A new entry, which is not yet in the database has the row id 0\&. If a new row object is created, the hasData bool is set to false\&. Before submitting the entry to the database, setData() has to be called to fill the row with data and toggle the verification bit\&.
  76. .PP
  77. The \fBRow\fP Object holds all the necessary information the \fBDatabase\fP class needs to commit (create or update) it\&. The Identifying information can be accessed with getRowId and getTable() / getTableName()\&.
  78. .PP
  79. For convenience and readabilty, subclasses exist that have the table property pre-set\&. These rows are then referred to as entries\&. See \fBAircraftEntry\fP, \fBFlightEntry\fP etc\&.
  80. .SH "Author"
  81. .PP
  82. Generated automatically by Doxygen for openPilotLog from the source code\&.