.. role:: ts-api-decorator

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

.. js:module:: Bcf
   :noindex:

.. container:: ts-api-section

   .. js:class:: BCFData

      This class contains data corresponding to the BCF file format.



.. container:: api-index-section

   .. rubric:: Constructors

   .. rst-class:: api-index-list-item api-kind-constructor api-parent-kind-class

   * :js:meth:`~Bcf.BCFData.constructor`



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :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
============

.. container:: ts-api-section

   .. js:function:: BCFData.constructor( bcfFileName, id)

      :param bcfFileName: None
      :type bcfFileName: string
      :param id: None
      :type id: number


      :rtype: BCFData



Methods
=======

.. rst-class:: ts-api-section

addTopic
--------

.. js:method:: BCFData.addTopic( topicId, topic)

   :param topicId: None
   :type topicId: string
   :param topic: None
   :type topic: BCFTopic


   Adds a BCF topic.


   :rtype: void

.. rst-class:: ts-api-section

exportBCF
---------

.. js:method:: BCFData.exportBCF( filename)

   :param filename: Filename BCF data will be exported as
   :type filename: string


   Exports BCF data to a file. Prompts the user to save it on their device.


   :rtype: Promise <void>

.. rst-class:: ts-api-section

getFilename
-----------

.. js:method:: BCFData.getFilename()



   Gets the BCF filename.


   :rtype: string

.. rst-class:: ts-api-section

getId
-----

.. js:method:: BCFData.getId()



   Identifier used to keep track of loaded BCF data.


   :rtype: number

.. rst-class:: ts-api-section

getTopic
--------

.. js:method:: BCFData.getTopic( topicId)

   :param topicId: None
   :type topicId: string


   Gets a BCF topic.


   :rtype: null | BCFTopic

.. rst-class:: ts-api-section

getTopics
---------

.. js:method:: BCFData.getTopics()





   :returns: A map associating BCF topic ids to BCF topic data.


   :rtype: Map <string, BCFTopic>

.. rst-class:: ts-api-section

getVersion
----------

.. js:method:: BCFData.getVersion()



   Gets the BCF version.


   :rtype: BCFVersion

.. rst-class:: ts-api-section

setVersion
----------

.. js:method:: BCFData.setVersion( version)

   :param version: None
   :type version: BCFVersion


   Sets the BCF version.


   :rtype: void

.. rst-class:: ts-api-section

toBcfZipBlob
------------

.. js:method:: BCFData.toBcfZipBlob()



   Creates a BCFZIP blob. The resulting blob is importable using ``BcfManager.addBCFFromBuffer``.


   :rtype: Promise <Blob>

