ATerm++

PrevUpHomeNext

Class function_symbol

genspect::function_symbol —

Synopsis

class function_symbol {
public:
  // construct/copy/destruct
  function_symbol(const std::string &, int, bool = false);
  function_symbol(AFun);

  // public member functions
  void protect();
  void unprotect();
  std::string name() const;
  unsigned int arity() const;
  bool is_quoted() const;
  operator AFun() const;
};

Description

function_symbol construct/copy/destruct

  1. function_symbol(const std::string & name, int arity, bool quoted = false);
  2. function_symbol(AFun function);

function_symbol public member functions

  1. void protect();

    Protect the function symbol. Just as aterms which are not on the stack or in registers must be protected through a call to protect, so must function_symbols be protected by calling protect.

  2. void unprotect();

    Release an function_symbol's protection.

  3. std::string name() const;

    Return the name of the function_symbol.

  4. unsigned int arity() const;

    Return the arity (number of arguments) of the function symbol (function_symbol).

  5. bool is_quoted() const;

    Determine if the function symbol (function_symbol) is quoted or not.

  6. operator AFun() const;

    Conversion to AFun.

Copyright © 2004 Wieger Wesselink

PrevUpHomeNext