File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
database/src/include/firebase/database Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1616#define FIREBASE_DATABASE_CLIENT_CPP_SRC_INCLUDE_FIREBASE_DATABASE_DATA_SNAPSHOT_H_
1717
1818#include < stddef.h>
19+
1920#include < string>
21+
2022#include " firebase/internal/common.h"
2123#include " firebase/variant.h"
2224
@@ -45,6 +47,13 @@ class DatabaseReference;
4547#endif // SWIG
4648class DataSnapshot {
4749 public:
50+ // / @brief Default constructor.
51+ // /
52+ // / This DataSnapshot contains nothing and is considered invalid (i.e.
53+ // / is_valid() == false). Use this to construct an empty DataSnapshot that you
54+ // / will later populate with data from a database callback.
55+ DataSnapshot () : internal_(nullptr ) {}
56+
4857#ifdef INTERNAL_EXPERIMENTAL
4958 explicit DataSnapshot (internal::DataSnapshotInternal* internal);
5059#endif
You can’t perform that action at this time.
0 commit comments