Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class xsi_key

boost::interprocess::xsi_key

Synopsis

// In header: <boost/interprocess/xsi_key.hpp>


class xsi_key {
public:

  // public member functions
  xsi_key();
  explicit xsi_key(key_t);
  xsi_key(const char *, boost::uint8_t);
  key_t get_key() const;
};

Description

A class that wraps XSI (System V) key_t type. This type calculates key_t from path and id using ftok, sets key to a specified value, or sets key to IPC_PRIVATE using the default constructor.

xsi_key public member functions

  1. xsi_key();

    Default constructor. Represents a private xsi_key.

  2. explicit xsi_key(key_t key);
    Creates a new XSI key using a specified value. Constructor is explicit to avoid ambiguity with shmid.
  3. xsi_key(const char * path, boost::uint8_t id);

    Creates a new XSI key obtained from a call to ftok with path "path" and id "id". If "path" is null, the key is IPC_PRIVATE. Throws interprocess_exception if ftok fails.

  4. key_t get_key() const;
    Returns the internal key_t value.

PrevUpHomeNext