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

Describes a database entry. More...

#include <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.

Member Function Documentation

◆ fulltext_oneline()

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

The full text in one line.

77  {
78  string oneline = fulltext;
79  size_t pos = 0;
80  while ((pos = oneline.find('\n', pos)) != std::string::npos)
81  {
82  oneline.replace(pos, 1, "\\n");
83  }
84  return oneline;
85  }

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.

67  {
68  if (a.datetime == b.datetime)
69  {
70  return true;
71  }
72 
73  return false;
74  }

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