
#######
BCFData
#######

.. js:class:: Bcf.BCFData

   This class contains data corresponding to the BCF file format.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~Bcf.BCFData.constructor`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~Bcf.BCFData.addTopic`
   * :js:meth:`~Bcf.BCFData.exportBCF`
   * :js:meth:`~Bcf.BCFData.getFilename`
   * :js:meth:`~Bcf.BCFData.getId`
   * :js:meth:`~Bcf.BCFData.getTopic`
   * :js:meth:`~Bcf.BCFData.getTopics`
   * :js:meth:`~Bcf.BCFData.getVersion`
   * :js:meth:`~Bcf.BCFData.setVersion`
   * :js:meth:`~Bcf.BCFData.toBcfZipBlob`
   
   




Constructors
============

.. js:method:: Bcf.BCFData.constructor

   .. rst-class:: sig-pretty-signature
   
      | BCFData(**bcfFileName**\ : *string*\ , **id**\ : *number*\ ): :js:class:`BCFData <Bcf.BCFData>`
   
   **Parameters**
   
      **bcfFileName**\ : *string*
   
      **id**\ : *number*
   
   
   **Returns**\ : :js:class:`BCFData <Bcf.BCFData>`
   





Methods
=======

.. js:method:: Bcf.BCFData.addTopic

   .. rst-class:: sig-pretty-signature
   
      | addTopic(**topicId**\ : *string*\ , **topic**\ : :js:class:`BCFTopic <Bcf.BCFTopic>`\ ): *void*
   
   Adds a BCF topic.
   
   **Parameters**
   
      **topicId**\ : *string*
   
      **topic**\ : :js:class:`BCFTopic <Bcf.BCFTopic>`
   
   
   **Returns**\ : *void*
   



.. js:method:: Bcf.BCFData.exportBCF

   .. rst-class:: sig-pretty-signature
   
      | exportBCF(**filename**\ : *string*\ ): *Promise*
   
   Exports BCF data to a file. Prompts the user to save it on their device.
   
   **Parameters**
   
      **filename**\ : *string*
   
         Filename BCF data will be exported as
   
   
   
   **Returns**\ : *Promise*
   



.. js:method:: Bcf.BCFData.getFilename

   .. rst-class:: sig-pretty-signature
   
      | getFilename(): *string*
   
   Gets the BCF filename.
   
   **Returns**\ : *string*
   



.. js:method:: Bcf.BCFData.getId

   .. rst-class:: sig-pretty-signature
   
      | getId(): *number*
   
   Identifier used to keep track of loaded BCF data.
   
   **Returns**\ : *number*
   



.. js:method:: Bcf.BCFData.getTopic

   .. rst-class:: sig-pretty-signature
   
      | getTopic(**topicId**\ : *string*\ ): (*None* \| :js:class:`BCFTopic <Bcf.BCFTopic>`\ )
   
   Gets a BCF topic.
   
   **Parameters**
   
      **topicId**\ : *string*
   
   
   **Returns**\ : (*None* \| :js:class:`BCFTopic <Bcf.BCFTopic>`\ )
   



.. js:method:: Bcf.BCFData.getTopics

   .. rst-class:: sig-pretty-signature
   
      | getTopics(): *Map*
   
   **Returns**\ : *Map*
   
      A map associating BCF topic ids to BCF topic data.
   
   



.. js:method:: Bcf.BCFData.getVersion

   .. rst-class:: sig-pretty-signature
   
      | getVersion(): :js:data:`BCFVersion <Bcf.BCFVersion>`
   
   Gets the BCF version.
   
   **Returns**\ : :js:data:`BCFVersion <Bcf.BCFVersion>`
   



.. js:method:: Bcf.BCFData.setVersion

   .. rst-class:: sig-pretty-signature
   
      | setVersion(**version**\ : :js:data:`BCFVersion <Bcf.BCFVersion>`\ ): *void*
   
   Sets the BCF version.
   
   **Parameters**
   
      **version**\ : :js:data:`BCFVersion <Bcf.BCFVersion>`
   
   
   **Returns**\ : *void*
   



.. js:method:: Bcf.BCFData.toBcfZipBlob

   .. rst-class:: sig-pretty-signature
   
      | toBcfZipBlob(): *Promise*
   
   Creates a BCFZIP blob. The resulting blob is importable using ``BcfManager.addBCFFromBuffer``\ .
   
   **Returns**\ : *Promise*
   





