Class Avogadro::Core::MoleculeSerializer#

class Avogadro::Core::MoleculeSerializer : public Serializer#

Implementation of ProtoCall::Serialization::Serializer.

<avogadro/protocall/moleculeserializer.h>

Public Functions

MoleculeSerializer(const Avogadro::Core::Molecule *molecule)#
Parameters

molecule – The molecule being serialized

bool serialize(void *data, size_t size)#

Serialize the molecule to that buffer provided.

Parameters
  • data – The buffer to serialize the molecule into.

  • size – The size of the buffer.

Returns

true if successful, false otherwise.

size_t size()#
Returns

The size of the serialized molecule when written to byte stream.