C++ Interface — cis_interface 0.3.0 documentation

# C++ Interface

class `CisInput`
  #include <CisInterface.hpp>

  Flag for checking if CisInterface.hpp has already been included.

  C++ interface to cisInput_t functionality.

  The CisInput class is a basic wrapper around the C cisInput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic input via an IPC queue.

  Subclassed by CisAsciiFileInput, CisObjInput, CisPlyInput

  Public Functions

  CisInput `CisInput`(const char *name)

    Constructor for CisInput.

    Parameters
      - `name`: constant character pointer to name of input queue. This should be the argument to an input driver in the yaml specification file.
  CisInput `CisInput`(cisInput_t x)

    Empty constructor for inheritance.

  CisInput `CisInput`(const char *name, const char *fmt)

    Constructor for CisInput with format.

    Parameters
      - `name`: constant character pointer to name of input queue. This should be the argument to an input driver in the yaml specification file.
      - `fmt`: character pointer to format string for parsing messages.
  void CisInput `_destroy_pi`()

    Alias to allow freeing of underlying C struct at the class level.

  CisInput`~CisInput`()

    Destructor for CisInput. See cis_free in CisInterface.h for details.

  cisInput_t CisInput `pi`()

    Return the cisInput_t structure.

    Return
      cisInput_t structure underlying the class.
  int CisInput `recv`(char *data, const size_t len)

    Receive a message shorter than CIS_MSG_MAX from the input queue. See cis_recv in CisInterface.h for additional details.

    Return
      int -1 if message could not be received. Length of the received message if message was received.
    Parameters
      - `data`: character pointer to allocated buffer where the message should be saved.
      - `len`: size_t length of the allocated message buffer in bytes.
  int CisInput `recv`(const int nargs, ...)

    Receive and parse a message shorter than CIS_MSG_MAX from the input queue. See cisRecv from CisInterface.h for details.

    Return
      integer specifying if the receive was succesful. Values >= 0 indicate success.
    Parameters
      - `nargs`: int Number of arguments being passed.
      - `...`: mixed arguments that should be assigned parameters extracted using the format string. Since these will be assigned, they should be pointers to memory that has already been allocated.
  int CisInput `recv_nolimit`(char **data, const size_t len)

    Receive a message larger than CIS_MSG_MAX from the input queue. See cis_recv_nolimit in CisInterface.h for additional details.

    Return
      int -1 if message could not be received. Length of the received message if message was received.
    Parameters
      - `data`: character pointer to allocated buffer where the message should be saved.
      - `len`: size_t length of the allocated message buffer in bytes.
  int CisInput `recv_nolimit`(const int nargs, ...)

    Receive and parse a message larger than CIS_MSG_MAX from the input queue. See cisRecv_nolimit from CisInterface.h for details.

    Return
      integer specifying if the receive was succesful. Values >= 0 indicate success.
    Parameters
      - `nargs`: int Number of arguments being passed.
      - `...`: mixed arguments that should be assigned parameters extracted using the format string. Since these will be assigned, they should be pointers to memory that has already been allocated.

  Private Members

  cisInput_t CisInput `_pi`

class `CisOutput`
  #include <CisInterface.hpp>

  C++ interface to cisOutput_t functionality.

  The CisOutput class is a basic wrapper around the C cisOutput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic output via an IPC queue.

  Subclassed by CisAsciiFileOutput, CisObjOutput, CisPlyOutput

  Public Functions

  CisOutput `CisOutput`(const char *name)

    Constructor for CisOutput.

    Parameters
      - `name`: constant character pointer to name of output queue. This should be the argument to an output driver in the yaml specification file.
  CisOutput `CisOutput`(const char *name, const char *fmt)

    Constructor for CisOutput with format.

    Parameters
      - `name`: constant character pointer to name of output queue. This should be the argument to an output driver in the yaml specification file.
      - `fmt`: character pointer to format string for formatting variables.
  CisOutput `CisOutput`(cisOutput_t x)

    Empty constructor for inheritance.

  void CisOutput `_destroy_pi`()

    Alias to allow freeing of underlying C struct at the class level.

  CisOutput`~CisOutput`()

    Destructor for CisOutput. See cis_free in CisInterface.h for details.

  cisOutput_t CisOutput `pi`()

    Return the cisOutput_t structure.

    Return
      cisOutput_t structure underlying the class.
  int CisOutput `send`(const char *data, const size_t len)

    Send a message smaller than CIS_MSG_MAX to the output queue. If the message is larger than CIS_MSG_MAX an error code will be returned. See cis_send in CisInterface.h for details.

    Return
      int 0 if send succesfull, -1 if send unsuccessful.
    Parameters
      - `data`: character pointer to message that should be sent.
      - `len`: size_t length of message to be sent.
  int CisOutput `send`(const int nargs, ...)

    Format and send a message smaller than CIS_MSG_MAX to the output queue. See cisSend from CisInterface.h for details.

    Return
      integer specifying if the send was succesful. Values >= 0 indicate success.
    Parameters
      - `nargs`: int Number of arguments being passed.
      - `...`: arguments for formatting.
  int CisOutput `send_nolimit`(const char *data, const size_t len)

    Send a message larger than CIS_MSG_MAX to the output queue. See cis_send_nolimit in CisInterface.h for details.

    Return
      int 0 if send succesfull, -1 if send unsuccessful.
    Parameters
      - `data`: character pointer to message that should be sent.
      - `len`: size_t length of message to be sent.
  int CisOutput `send_nolimit`(const int nargs, ...)

    Format and send a message larger than CIS_MSG_MAX to the output queue. See cisSend from CisInterface.h for details.

    Return
      integer specifying if the send was succesful. Values >= 0 indicate success.
    Parameters
      - `nargs`: int Number of arguments being passed.
      - `...`: arguments for formatting.
  int CisOutput `send_eof`()

    Send EOF message to output file, closing it.

    Return
      int 0 if send was succesfull. All other values indicate errors.

  Private Members

  cisOutput_t CisOutput `_pi`

class `CisRpc`
  #include <CisInterface.hpp>

  C++ interface to cisRpc_t functionality.

  The CisRpc class is a basic wrapper around the C cisRpc_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic RPC messaging via IPC queues.

  Subclassed by CisRpcClient, CisRpcServer

  Public Functions

  CisRpc `CisRpc`(const char *name, const char *outFormat, const char *inFormat)

    Constructor for CisRpc.

    Parameters
      - `name`: constant character pointer name of the output queue.
      - `outFormat`: character pointer to format that should be used for formatting output.
      - `inFormat`: character pointer to format that should be used for parsing input.
  CisRpc `CisRpc`(cisRpc_t x)

    Empty constructor for inheritance.

  void CisRpc `_destroy_pi`()

    Alias to allow freeing of underlying C struct at the class level.

  CisRpc`~CisRpc`()

    Destructor for CisRpc. See cis_free in CisInterface.h for details.

  cisRpc_t CisRpc `pi`()

    Return the cisRpc_t structure.

    Return
      cisRpc_t structure underlying the class.
  int CisRpc `send`(const int nargs, ...)

    Format and send a message to an RPC output queue. See rpcSend from CisInterface.h for details.

    Return
      integer specifying if the send was succesful. Values >= 0 indicate success.
    Parameters
      - `nargs`: int Number of arguments being passed.
      - `...`: arguments for formatting.
  int CisRpc `recv`(const int nargs, ...)

    Receive and parse a message from an RPC input queue. See rpcRecv from CisInterface.h for details.

    Return
      integer specifying if the receive was succesful. Values >= 0 indicate success.
    Parameters
      - `nargs`: int Number of arguments being passed.
      - `...`: mixed arguments that should be assigned parameters extracted using the format string. Since these will be assigned, they should be pointers to memory that has already been allocated.

  Private Members

  cisRpc_t CisRpc `_pi`

class `CisRpcServer` : public CisRpc
  #include <CisInterface.hpp>

  C++ interface to cisRpc_t server-side functionality. The CisRpcServer class is a basic wrapper around the C cisRpc_t structure and associated server-side functions from the CisInterface.h header. It provides the user with C++ style access to basic RPC server operations.

  Public Functions

  CisRpcServer `CisRpcServer`(const char *name, const char *inFormat, const char *outFormat)

    Constructor for CisRpcServer.

    Parameters
      - `name`: constant character pointer name used for input and output queues.
      - `inFormat`: character pointer to format that should be used for parsing input.
      - `outFormat`: character pointer to format that should be used for formatting output.
  CisRpcServer`~CisRpcServer`()

    Destructor for CisRpcServer. See cis_free in CisInterface.h for details.

class `CisRpcClient` : public CisRpc
  #include <CisInterface.hpp>

  C++ interface to cisRpc_t client-side functionality. The CisRpcClient class is a basic wrapper around the C cisRpc_t structure and associated client-side functions from the CisInterface.h header. It provides the user with C++ style access to basic RPC client operations.

  Public Functions

  CisRpcClient `CisRpcClient`(const char *name, const char *outFormat, const char *inFormat)

    Constructor for CisRpcClient.

    Parameters
      - `name`: constant character pointer name used for input and output queues.
      - `outFormat`: character pointer to format that should be used for formatting output.
      - `inFormat`: character pointer to format that should be used for parsing input.
  CisRpcClient`~CisRpcClient`()

    Destructor for CisRpcClient. See cis_free in CisInterface.h for details.

  int CisRpcClient `call`(const int nargs, ...)

    Send request to an RPC server from the client and wait for a response. See rpcCall in CisInterface.h for details.

    Return
      integer specifying if the receive was succesful. Values >= 0 indicate success.
    Parameters
      - `nargs`: int Number of arguments being passed.
      - `...`: mixed arguments that include those that should be formatted using the output format string, followed by those that should be assigned parameters extracted using the input format string. These that will be assigned should be pointers to memory that has already been allocated.

class `CisAsciiFileOutput` : public CisOutput
  #include <CisInterface.hpp>

  C++ interface to cisAsciiFileOutput_t functionality. The CisAsciiFileOutput class is a basic wrapper around the C cisAsciiFileOutput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII file output operations.

  Subclassed by CisAsciiArrayOutput, CisAsciiArrayOutput_local, CisAsciiFileOutput_local, CisAsciiTableOutput, CisAsciiTableOutput_local

  Public Functions

  CisAsciiFileOutput `CisAsciiFileOutput`(const char *name)

    Constructor for CisAsciiFileOutput.

    Parameters
      - `name`: constant character pointer to the name of an output channel.
  CisAsciiFileOutput `CisAsciiFileOutput`(cisOutput_t x)

    Empty constructor for inheritance.

  int CisAsciiFileOutput `send_line`(const char *line)

    Send a single line to a file or queue.

    Return
      int 0 if send was succesfull. All other values indicate errors.
    Parameters
      - `line`: character pointer to line that should be sent.

class `CisAsciiFileOutput_local` : public CisAsciiFileOutput
  #include <CisInterface.hpp>

  C++ interface to cisAsciiFileOutput_t functionality for local files. The CisAsciiFileOutput_local class is a basic wrapper around the C cisAsciiFileOutput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII file output operations.

  Public Functions

  CisAsciiFileOutput_local `CisAsciiFileOutput_local`(const char *name)

    Constructor for CisAsciiFileOutput.

    Parameters
      - `name`: constant character pointer to path of local file.

class `CisAsciiFileInput` : public CisInput
  #include <CisInterface.hpp>

  C++ interface to cisAsciiFileInput_t functionality. The CisAsciiFileInput class is a basic wrapper around the C cisAsciiFileInput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII file input operations.

  Subclassed by CisAsciiArrayInput, CisAsciiArrayInput_local, CisAsciiFileInput_local, CisAsciiTableInput, CisAsciiTableInput_local

  Public Functions

  CisAsciiFileInput `CisAsciiFileInput`(const char *name)

    Constructor for CisAsciiFileInput.

    Parameters
      - `name`: constant character pointer to the name of an input channel.
  CisAsciiFileInput `CisAsciiFileInput`(cisInput_t x)

    Empty constructor for inheritance.

  int CisAsciiFileInput `recv_line`(char *line, const size_t n)

    Receive a single line from an associated file or queue. See af_recv_line in CisInterface.h for details.

    Return
      int Number of bytes read/received. Negative values indicate that there was either an error or the EOF message was received.
    Parameters
      - `line`: character pointer to allocate memory where the received line should be stored.
      - `n`: size_t Size of the allocated memory block in bytes.

class `CisAsciiFileInput_local` : public CisAsciiFileInput
  #include <CisInterface.hpp>

  C++ interface to cisAsciiFileInput_t functionality for local files. The CisAsciiFileInput_local class is a basic wrapper around the C cisAsciiFileInput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII file input operations.

  Public Functions

  CisAsciiFileInput_local `CisAsciiFileInput_local`(const char *name)

    Constructor for CisAsciiFileInput_local.

    Parameters
      - `name`: constant character pointer to path of local file.

class `CisAsciiTableOutput` : public CisAsciiFileOutput
  #include <CisInterface.hpp>

  C++ interface to cisAsciiTableOutput_t functionality.

  The CisAsciiTableOutput class is a basic wrapper around the C cisAsciiTableOutput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII table output operations.

  Public Functions

  CisAsciiTableOutput `CisAsciiTableOutput`(const char *name, const char *format_str)

    Constructor for CisAsciiTableOutput.

    Parameters
      - `name`: constant character pointer to the name of an output channel.
      - `format_str`: character pointer to format string that should be used to format rows into table lines.

class `CisAsciiTableOutput_local` : public CisAsciiFileOutput
  #include <CisInterface.hpp>

  C++ interface to cisAsciiTableOutput_t functionality for local files.

  The CisAsciiTableOutput class is a basic wrapper around the C cisAsciiTableOutput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII table output operations.

  Public Functions

  CisAsciiTableOutput_local `CisAsciiTableOutput_local`(const char *name, const char *format_str)

    Constructor for CisAsciiTableOutput for local files.

    Parameters
      - `name`: constant character pointer to path of local table.
      - `format_str`: character pointer to format string that should be used to format rows into table lines.

class `CisAsciiArrayOutput` : public CisAsciiFileOutput
  #include <CisInterface.hpp>

  C++ interface to cisAsciiTableOutput_t functionality with arrays.

  The CisAsciiArrayOutput class is a basic wrapper around the C cisAsciiTableOutput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII table output operations.

  Public Functions

  CisAsciiArrayOutput `CisAsciiArrayOutput`(const char *name, const char *format_str)

    Constructor for CisAsciiArrayOutput.

    Parameters
      - `name`: constant character pointer to the name of an output channel.
      - `format_str`: character pointer to format string that should be used to format arrays into a table.

class `CisAsciiArrayOutput_local` : public CisAsciiFileOutput
  #include <CisInterface.hpp>

  C++ interface to cisAsciiTableOutput_t functionality for local files.

  The CisAsciiArrayOutput class is a basic wrapper around the C cisAsciiTableOutput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII table output operations.

  Public Functions

  CisAsciiArrayOutput_local `CisAsciiArrayOutput_local`(const char *name, const char *format_str)

    Constructor for CisAsciiArrayOutput for local files.

    Parameters
      - `name`: constant character pointer to path of local table.
      - `format_str`: character pointer to format string that should be used to format arrays into table columns.

class `CisAsciiTableInput` : public CisAsciiFileInput
  #include <CisInterface.hpp>

  C++ interface to cisAsciiTableInput_t functionality.

  The CisAsciiTableInput class is a basic wrapper around the C cisAsciiTableInput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII table input operations.

  Public Functions

  CisAsciiTableInput `CisAsciiTableInput`(const char *name)

    Constructor for CisAsciiTableInput. Due to issues with the C++ version of vsscanf, flags and precision indicators for floating point format specifiers (e.g. e, f), must be removed so that table input can be properly parsed.

    Parameters
      - `name`: constant character pointer to the name of an input channel.

class `CisAsciiTableInput_local` : public CisAsciiFileInput
  #include <CisInterface.hpp>

  C++ interface to cisAsciiTableInput_t functionality for local files.

  The CisAsciiTableInput class is a basic wrapper around the C cisAsciiTableInput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII table input operations.

  Public Functions

  CisAsciiTableInput_local `CisAsciiTableInput_local`(const char *name)

    Constructor for CisAsciiTableInput_local. Due to issues with the C++ version of vsscanf, flags and precision indicators for floating point format specifiers (e.g. e, f), must be removed so that table input can be properly parsed.

    Parameters
      - `name`: constant character pointer to path of local table.

class `CisAsciiArrayInput` : public CisAsciiFileInput
  #include <CisInterface.hpp>

  C++ interface to cisAsciiTableInput_t functionality for arrays.

  The CisAsciiArrayInput class is a basic wrapper around the C cisAsciiTableInput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII table input operations.

  Public Functions

  CisAsciiArrayInput `CisAsciiArrayInput`(const char *name)

    Constructor for CisAsciiArrayInput. Due to issues with the C++ version of vsscanf, flags and precision indicators for floating point format specifiers (e.g. e, f), must be removed so that table input can be properly parsed.

    Parameters
      - `name`: constant character pointer to the name of an input channel.

class `CisAsciiArrayInput_local` : public CisAsciiFileInput
  #include <CisInterface.hpp>

  C++ interface to cisAsciiTableInput_t functionality for local files as arrays.

  The CisAsciiArrayInput class is a basic wrapper around the C cisAsciiTableInput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII table input operations.

  Public Functions

  CisAsciiArrayInput_local `CisAsciiArrayInput_local`(const char *name)

    Constructor for CisAsciiArrayInput_local. Due to issues with the C++ version of vsscanf, flags and precision indicators for floating point format specifiers (e.g. e, f), must be removed so that table input can be properly parsed.

    Parameters
      - `name`: constant character pointer to path of local table.

class `CisPlyOutput` : public CisOutput
  #include <CisInterface.hpp>

  C++ interface to cisPlyOutput_t functionality. The CisPlyOutput class is a basic wrapper around the C cisPlyOutput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII file output operations.

  Public Functions

  CisPlyOutput `CisPlyOutput`(const char *name)

    Constructor for CisPlyOutput.

    Parameters
      - `name`: constant character pointer to the name of an output channel.
  CisPlyOutput `CisPlyOutput`(cisOutput_t x)

    Empty constructor for inheritance.

class `CisPlyInput` : public CisInput
  #include <CisInterface.hpp>

  C++ interface to cisPlyInput_t functionality. The CisPlyInput class is a basic wrapper around the C cisPlyInput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII file input operations.

  Public Functions

  CisPlyInput `CisPlyInput`(const char *name)

    Constructor for CisPlyInput.

    Parameters
      - `name`: constant character pointer to the name of an input channel.
  CisPlyInput `CisPlyInput`(cisInput_t x)

    Empty constructor for inheritance.

class `CisObjOutput` : public CisOutput
  #include <CisInterface.hpp>

  C++ interface to cisObjOutput_t functionality. The CisObjOutput class is a basic wrapper around the C cisObjOutput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII file output operations.

  Public Functions

  CisObjOutput `CisObjOutput`(const char *name)

    Constructor for CisObjOutput.

    Parameters
      - `name`: constant character pointer to the name of an output channel.
  CisObjOutput `CisObjOutput`(cisOutput_t x)

    Empty constructor for inheritance.

class `CisObjInput` : public CisInput
  #include <CisInterface.hpp>

  C++ interface to cisObjInput_t functionality. The CisObjInput class is a basic wrapper around the C cisObjInput_t structure and associated functions from the CisInterface.h header. It provides the user with C++ style access to basic ASCII file input operations.

  Public Functions

  CisObjInput `CisObjInput`(const char *name)

    Constructor for CisObjInput.

    Parameters
      - `name`: constant character pointer to the name of an input channel.
  CisObjInput `CisObjInput`(cisInput_t x)

    Empty constructor for inheritance.