/usr/include/citygml/attributesmap.h is in libcitygml-dev 2.0.8-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | #pragma once
#include <string>
#include <map>
#include <citygml/citygml_api.h>
namespace citygml
{
/**
* @brief The AttributeType enum represents the data type of an object attribute
*/
enum class AttributeType
{
String,
Double,
Integer,
Date,
Uri
};
/**
* @brief The AttributeValue class stores an attribute value and its data type
*/
class LIBCITYGML_EXPORT AttributeValue
{
public:
AttributeValue();
AttributeValue(const char* value);
AttributeValue(const std::string& value, AttributeType type=AttributeType::String);
AttributeValue(double value);
AttributeValue(int value);
void setType(AttributeType type);
AttributeType getType() const;
void setValue(const std::string& value, AttributeType type=AttributeType::String);
void setValue(double value);
void setValue(int value);
std::string asString() const;
double asDouble(double defaultValue=0.0) const;
int asInteger(int defaultValue=0) const;
private:
AttributeType m_type;
std::string m_value;
};
LIBCITYGML_EXPORT std::ostream& operator<<(std::ostream& os, const AttributeValue& o);
typedef std::map<std::string, AttributeValue> AttributesMap;
} // namespace citygml
|