Implementing banner
#26
Before using Json I made this class, to be implemented by each item handler that needs custom metadata.

/** Storage class for item meta data */
class cItemMeta
{
public:
  virtual ~cItemMeta() {}

  /** Load from NBT source. */
  virtual void FromNBT(const cParsedNBT & a_NBT) = 0;

  /** Load from copy. */
  virtual void FromCopy(const cItemMeta * a_Meta) = 0;

  /** From JSON */
  virtual void FromJSON(const Json::Value & a_Value) = 0;

  /** Write to NBT */
  virtual void ToNBT(cFastNBTWriter & a_Writer) = 0;

  /** To JSON */
  virtual void ToJSON(Json::Value & a_OutValue) = 0;

  /** Is equal to */
  virtual bool IsEqual(cItemMeta * a_ItemMeta) = 0;
};
Reply
Thanks given by:


Messages In This Thread
Implementing banner - by Seyaku - 05-21-2016, 06:53 AM
RE: Implementing banner - by xoft - 05-21-2016, 11:14 PM
RE: Implementing banner - by Seyaku - 05-22-2016, 01:04 AM
RE: Implementing banner - by Jammet - 05-22-2016, 01:07 AM
RE: Implementing banner - by Seyaku - 05-22-2016, 01:41 AM
RE: Implementing banner - by Jammet - 05-22-2016, 03:26 AM
RE: Implementing banner - by xoft - 05-22-2016, 06:41 AM
RE: Implementing banner - by Seyaku - 05-22-2016, 11:41 PM
RE: Implementing banner - by xoft - 05-23-2016, 01:02 AM
RE: Implementing banner - by Seyaku - 05-23-2016, 01:47 AM
RE: Implementing banner - by xoft - 05-23-2016, 02:04 AM
RE: Implementing banner - by Seyaku - 05-23-2016, 02:53 AM
RE: Implementing banner - by xoft - 05-23-2016, 05:22 AM
RE: Implementing banner - by Seyaku - 05-23-2016, 05:37 AM
RE: Implementing banner - by Seyaku - 05-24-2016, 02:23 AM
RE: Implementing banner - by xoft - 05-24-2016, 04:20 AM
RE: Implementing banner - by sphinxc0re - 05-24-2016, 05:01 AM
RE: Implementing banner - by Seyaku - 05-24-2016, 05:52 AM
RE: Implementing banner - by tigerw - 05-24-2016, 08:00 AM
RE: Implementing banner - by Seyaku - 05-24-2016, 09:29 AM
RE: Implementing banner - by xoft - 05-24-2016, 04:32 PM
RE: Implementing banner - by tigerw - 05-24-2016, 11:17 PM
RE: Implementing banner - by tigerw - 05-24-2016, 11:21 PM
RE: Implementing banner - by Seyaku - 05-25-2016, 12:30 AM
RE: Implementing banner - by tigerw - 05-25-2016, 01:52 AM
RE: Implementing banner - by Seyaku - 05-25-2016, 02:09 AM
RE: Implementing banner - by xoft - 05-25-2016, 02:30 AM
RE: Implementing banner - by tigerw - 05-25-2016, 05:06 AM
RE: Implementing banner - by Seyaku - 05-25-2016, 07:33 AM
RE: Implementing banner - by PureTryOut - 11-14-2016, 02:29 AM
RE: Implementing banner - by Seyaku - 12-02-2016, 09:44 AM
RE: Implementing banner - by PureTryOut - 12-05-2016, 03:37 AM
RE: Implementing banner - by xoft - 12-05-2016, 05:22 AM
RE: Implementing banner - by PureTryOut - 12-06-2016, 06:00 AM
RE: Implementing banner - by xoft - 12-06-2016, 05:51 PM
RE: Implementing banner - by Seyaku - 12-08-2016, 05:36 AM
RE: Implementing banner - by Seadragon91 - 03-23-2017, 09:16 PM



Users browsing this thread: 7 Guest(s)