+
+ /** Id of this Membership, set by the protocol module, other components should never read or
+ * write this field.
+ */
+ Id id;
+
+ /** Converts a string to a Membership::Id
+ * @param str The string to convert
+ * @return Raw value of type Membership::Id
+ */
+ static Id IdFromString(const std::string& str)
+ {
+ return ConvToNum<Id>(str);
+ }
+
+ /** Constructor, sets the user and chan fields to the parameters, does NOT update any bookkeeping
+ * information in the User or the Channel.
+ * Call Channel::JoinUser() or ForceJoin() to make a user join a channel instead of constructing
+ * Membership objects directly.
+ */