File: cpp_interface.rst

package info (click to toggle)
aoflagger 3.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,960 kB
  • sloc: cpp: 83,076; python: 10,187; sh: 260; makefile: 178
file content (37 lines) | stat: -rw-r--r-- 1,546 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
C++ interface
=============

AOFlagger provides external C++ and Python Application Programming Interfaces (API)
to call the aoflagger from those languages.

.. note::
   These interfaces are not used to design a custom flagging strategy.
   Custom flagging strategies make use of an internal Lua interface, which are described
   in the :doc:`chapter on designing strategies <designing_strategies>`.
   The external interfaces described here make
   it possible to "push data" through AOFlagger from other software.

These external interfaces allow, for example, the integration of the AOFlagger inside a pipeline
and observatory. To use the interface, the C++ header file "``aoflagger.h``"
is installed as part of the package, and can be ``#include``\ d in a program's source code.
Additionally, the program needs to be linked with libaoflagger. The best way to link
a C++ program to aoflagger, is by using cmake's ``find_package`` utility, which can
also handle versioning, etc. For example

.. code-block:: cmake

   find_package(AOFlagger 3 REQUIRED)
   include_directories(${AOFLAGGER_INCLUDE_DIR})
   target_link_libraries(yoursoftware ${AOFLAGGER_LIB})

Reference
~~~~~~~~~

The documentation for the external C++ API is automatically extracted from the code
using Doxygen. 
The C++ API reference that summarizes all functions, classes, etc. can be found here:

 * http://www.andreoffringa.org/aoflagger/doxygen/

The Python interface mirrors the C++ API, and these pages can therefore also be
used as reference for the Python interface.