remwharead  0.7.1
Public Member Functions | Public Attributes | Friends | List of all members
remwharead::Database::entry Struct Reference

Describes a database entry. More...

#include <remwharead/sqlite.hpp>

Public Member Functions

const string fulltext_oneline () const
 The full text in one line. More...
 

Public Attributes

string uri
 
string archive_uri
 
time_point datetime
 
vector< string > tags
 
string title
 
string description
 
string fulltext
 

Friends

bool operator== (const Database::entry &a, const Database::entry &b)
 Returns true if date and time are equal. More...
 

Detailed Description

Describes a database entry.

Since
0.6.0

Member Function Documentation

◆ fulltext_oneline()

const string remwharead::Database::entry::fulltext_oneline ( ) const

The full text in one line.

Since
0.6.0
74  {
75  string oneline = fulltext;
76  size_t pos = 0;
77  while ((pos = oneline.find('\n', pos)) != string::npos)
78  {
79  oneline.replace(pos, 1, "\\n");
80  }
81  return oneline;
82  }

Friends And Related Function Documentation

◆ operator==

bool operator== ( const Database::entry a,
const Database::entry b 
)
friend

Returns true if date and time are equal.

Since
0.6.0
69  {
70  return (a.datetime == b.datetime);
71  }

The documentation for this struct was generated from the following files: