tqchen commented on a change in pull request #4628: [Object] Add String
container
URL: https://github.com/apache/incubator-tvm/pull/4628#discussion_r363405556
##########
File path: include/tvm/runtime/container.h
##########
@@ -274,6 +275,99 @@ class ADT : public ObjectRef {
TVM_DEFINE_OBJECT_REF_METHODS(ADT, ObjectRef, ADTObj);
};
+/*! \brief An object representing string. It's POD type. */
+class StringObj : public Object {
+ public:
+ /*! \brief The length of the string object. */
+ uint32_t size;
+
+ /*! \brief The pointer to string data. */
+ char* data;
+
+ /*! \brief String object which is moved from std::string container. */
+ class FromStd;
+};
+
+/*! \brief An object representing string moved from std::string. */
+class StringObj::FromStd : public StringObj {
Review comment:
Let us move fromStd to "implementation section in the end", as they are not
supposed to be seen by the user
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services