I have reproduced the requirements I am talking about below.
The API will support inputting and parsing CIF text from external sources.
The API will support outputting logical CIF structure and content to external sinks as well-formed CIF text.
Between source, if any, and sink, if any, and in memory where applicable, the API will support all CIF-compatible inquiries and modifications of logical CIF structure and data, including, but not necessarily limited to
adding and removing data blocks
adding save frames to and removing them from data blocks
determining the presence of a data names and their contexts (whether looped; other names in the same loop) within a block or frame
adding data names to a chosen context (for example, to a particular loop) within a block or frame
removing data names and their associated data values from a block or frame
querying the data value(s) associated with a specified data name within a block or frame
replacing one or more data values associated with a specified data name within a block or frame
querying the set(s) of related data values for a chosen context within a block or frame (for example, retrieving all the values belonging to a chosen packet of a chosen loop)
replacing one or more of the data values belonging to one or more of the sets of related data values for a chosen context within a block or frame (for example, replacing selected values in a chosen packet of a chosen loop)
adding one or more sets of related data values to a chosen context within a block or frame (for example, adding a packet to a chosen loop)
removing one or more sets of related data values for a chosen context within a block or frame (for example, removing a selected packet from a chosen loop)