DatabaseInfo.h
Go to the documentation of this file.
1 /****
2  * ConfigDB/DatabaseInfo.h
3  *
4  * Copyright 2024 mikee47 <mike@sillyhouse.net>
5  *
6  * This file is part of the ConfigDB Library
7  *
8  * This library is free software: you can redistribute it and/or modify it under the terms of the
9  * GNU General Public License as published by the Free Software Foundation, version 3 or later.
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13  * See the GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along with this library.
16  * If not, see <https://www.gnu.org/licenses/>.
17  *
18  ****/
19 
20 #pragma once
21 
22 #include "PropertyInfo.h"
23 
24 namespace ConfigDB
25 {
26 struct DatabaseInfo {
27  const FlashString& name;
28  uint32_t storeCount;
30 
31  const PropertyInfo& getObject(unsigned index) const
32  {
33  return stores[index];
34  }
35 
36  int findStore(const char* name, size_t nameLength) const;
37  int indexOf(const PropertyInfo& store) const;
38 };
39 
40 } // namespace ConfigDB
describes a counted string stored in flash memory
Definition: String.hpp:174
Definition: Array.h:26
Definition: DatabaseInfo.h:26
const PropertyInfo & getObject(unsigned index) const
Definition: DatabaseInfo.h:31
int findStore(const char *name, size_t nameLength) const
const FlashString & name
Definition: DatabaseInfo.h:27
const PropertyInfo stores[]
Definition: DatabaseInfo.h:29
uint32_t storeCount
Definition: DatabaseInfo.h:28
int indexOf(const PropertyInfo &store) const
Property metadata.
Definition: PropertyInfo.h:126