5 #ifndef STREAMBASE_FIELD_H_
6 #define STREAMBASE_FIELD_H_
8 #include "StreamBase.hpp"
13 #include "CompleteDataType.hpp"
16 SB_INTERNAL_FWD(SchemaUtil);
50 Field(
const std::string &name,
DataType type,
size_t size = (
size_t)-1);
65 #ifndef DOXYGEN_INTERNAL_ONLY
67 std::string as_xml()
const;
71 std::string as_string()
const;
77 const std::string &
getName()
const {
return _name; }
93 const Schema& getArgumentSchema()
const {
99 return getType().getSize();
108 return _cdt == other._cdt;
111 const std::vector<Field> &getFieldPath()
const {
return _field_path; }
113 #ifndef DOXYGEN_INTERNAL_ONLY
115 static const int VARLEN_HEADER_SIZE = 4;
118 static const int STRING_HEADER_SIZE = VARLEN_HEADER_SIZE;
121 static const int NESTED_TUPLE_HEADER_SIZE = VARLEN_HEADER_SIZE;
124 static const int LIST_HEADER_SIZE = VARLEN_HEADER_SIZE + 4;
128 Field(
const std::vector<Field>& field_path);
131 CompleteDataType _cdt;
134 std::vector<Field> _field_path;
136 std::string as_xml_helper(
const CompleteDataType& cdt, std::string tag, std::string name)
const;
139 friend class sb_internal::SchemaUtil;
140 friend class JavaQBox;