.TH "Sratom" 3 "Sat May 5 2012" "Version 0.2.0" "Sratom" \" -*- nroff -*- .ad l .nh .SH NAME Sratom \- .SS "Opaque Types" .in +1c .ti -1c .RI "typedef struct SratomImpl \fBSratom\fP" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBSratom\fP * \fBsratom_new\fP (LV2_URID_Map *map)" .br .ti -1c .RI "void \fBsratom_free\fP (\fBSratom\fP *sratom)" .br .ti -1c .RI "void \fBsratom_set_sink\fP (\fBSratom\fP *sratom, const char *base_uri, SerdStatementSink sink, SerdEndSink end_sink, void *handle)" .br .ti -1c .RI "void \fBsratom_set_pretty_numbers\fP (\fBSratom\fP *sratom, bool pretty_numbers)" .br .ti -1c .RI "int \fBsratom_write\fP (\fBSratom\fP *sratom, LV2_URID_Unmap *unmap, uint32_t flags, const SerdNode *subject, const SerdNode *predicate, uint32_t type, uint32_t size, const void *body)" .br .ti -1c .RI "void \fBsratom_read\fP (\fBSratom\fP *sratom, LV2_Atom_Forge *forge, SordWorld *world, SordModel *model, const SordNode *node)" .br .ti -1c .RI "char * \fBsratom_to_turtle\fP (\fBSratom\fP *sratom, LV2_URID_Unmap *unmap, const char *base_uri, const SerdNode *subject, const SerdNode *predicate, uint32_t type, uint32_t size, const void *body)" .br .ti -1c .RI "LV2_Atom * \fBsratom_from_turtle\fP (\fBSratom\fP *sratom, const char *base_uri, const SerdNode *subject, const SerdNode *predicate, const char *str)" .br .ti -1c .RI "LV2_Atom_Forge_Ref \fBsratom_forge_sink\fP (LV2_Atom_Forge_Sink_Handle handle, const void *buf, uint32_t size)" .br .ti -1c .RI "LV2_Atom * \fBsratom_forge_deref\fP (LV2_Atom_Forge_Sink_Handle handle, LV2_Atom_Forge_Ref ref)" .br .in -1c .SH "Detailed Description" .PP An LV2 Atom RDF serialisation library\&. .SH "Typedef Documentation" .PP .SS "typedef struct SratomImpl \fBSratom\fP" .PP Atom serialiser\&. .SH "Function Documentation" .PP .SS "\fBSratom\fP* \fBsratom_new\fP (LV2_URID_Map *map)" .PP Create a new Atom serialiser\&. .SS "void \fBsratom_free\fP (\fBSratom\fP *sratom)" .PP Free an Atom serialisation\&. .SS "void \fBsratom_set_sink\fP (\fBSratom\fP *sratom, const char *base_uri, SerdStatementSinksink, SerdEndSinkend_sink, void *handle)" .PP Set the sink(s) where sratom will write its output\&. This must be called before calling \fBsratom_write()\fP\&. .SS "void \fBsratom_set_pretty_numbers\fP (\fBSratom\fP *sratom, boolpretty_numbers)" .PP Write pretty numeric literals\&. If \fCpretty_numbers\fP is true, numbers will be written as pretty Turtle literals, rather than string literals with precise types\&. The cost of this is that the types might get fudged on a round-trip to RDF and back\&. .SS "int \fBsratom_write\fP (\fBSratom\fP *sratom, LV2_URID_Unmap *unmap, uint32_tflags, const SerdNode *subject, const SerdNode *predicate, uint32_ttype, uint32_tsize, const void *body)" .PP Write an Atom to RDF\&. The serialised atom is written to the sink set by \fBsratom_set_sink()\fP\&. .PP \fBReturns:\fP .RS 4 0 on success, or a non-zero error code otherwise\&. .RE .PP .SS "void \fBsratom_read\fP (\fBSratom\fP *sratom, LV2_Atom_Forge *forge, SordWorld *world, SordModel *model, const SordNode *node)" .PP Read an Atom from RDF\&. The resulting atom will be written to \fCforge\fP\&. .SS "char* \fBsratom_to_turtle\fP (\fBSratom\fP *sratom, LV2_URID_Unmap *unmap, const char *base_uri, const SerdNode *subject, const SerdNode *predicate, uint32_ttype, uint32_tsize, const void *body)" .PP Serialise an Atom to a Turtle string\&. The returned string must be free()'d by the caller\&. .SS "LV2_Atom* \fBsratom_from_turtle\fP (\fBSratom\fP *sratom, const char *base_uri, const SerdNode *subject, const SerdNode *predicate, const char *str)" .PP Read an Atom from a Turtle string\&. The returned atom must be free()'d by the caller\&. .SS "LV2_Atom_Forge_Ref \fBsratom_forge_sink\fP (LV2_Atom_Forge_Sink_Handlehandle, const void *buf, uint32_tsize)" .PP A convenient resizing sink for LV2_Atom_Forge\&. The handle must point to an initialized SerdChunk\&. .SS "LV2_Atom* \fBsratom_forge_deref\fP (LV2_Atom_Forge_Sink_Handlehandle, LV2_Atom_Forge_Refref)" .PP The corresponding deref function for sratom_forge_sink\&. .SH "Author" .PP Generated automatically by Doxygen for Sratom from the source code\&.