blob: e68829d288c7de94cdb36b1a7d4bca76e6c23bb3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#ifndef DYNAMIC_DEPTH_INTERNAL_DYNAMIC_DEPTH_ELEMENT_H_ // NOLINT
#define DYNAMIC_DEPTH_INTERNAL_DYNAMIC_DEPTH_ELEMENT_H_ // NOLINT
#include <unordered_map>
#include "xmpmeta/xml/deserializer.h"
#include "xmpmeta/xml/serializer.h"
namespace photos_editing_formats {
namespace dynamic_depth {
/**
* An interface for an element in the Dynamic Depth spec.
*/
class Element {
public:
virtual ~Element() {}
// Appends child elements' namespaces' and their respective hrefs to the
// given collection, and any parent nodes' names to prefix_names.
// Key: Name of the namespace.
// Value: Full namespace URL.
// Example: ("Image", "http://ns.google.com/photos/dd/1.0/image/")
virtual void GetNamespaces(
std::unordered_map<string, string>* ns_name_href_map) = 0;
// Serializes this element.
virtual bool Serialize(xml::Serializer* serializer) const = 0;
};
} // namespace dynamic_depth
} // namespace photos_editing_formats
#endif // DYNAMIC_DEPTH_INTERNAL_DYNAMIC_DEPTH_ELEMENT_H_ // NOLINT
|