| Home | Libraries | People | FAQ | More

## Struct template entry_type

boost::process::basic_environment::entry_type

## Synopsis

    // In header: <boost/process/environment.hpp>

    template<typename Char, typename Environment>
    struct entry_type {
      // types
      typedef Char                             value_type;
      typedef const value_type *               pointer;
      typedef std::basic_string< value_type >  string_type;
      typedef boost::iterator_range< pointer > range;
      typedef Environment                      environment_t;

      // construct/copy/destruct
      entry & operator=(const entry &) = default;
      entry & operator=(const string_type &);
      entry & operator=(const std::vector< string_type > &);

      // public member functions
      std::vector< string_type > to_vector() const;
       entry(const entry &) = default;
      bool empty() const;
      void assign(const string_type &);
      void assign(const std::vector< string_type > &);
      void append(const string_type &);
      void clear();
      entry & operator+=(const string_type &);
    };

## Description

Proxy class used for read and write access to members by [] or .at()

| Note
Holds a reference to the environment it was created from.

### `entry_type` public construct/copy/destruct

1.     entry & operator=(const entry &) = default;

   Move Constructor.

2.     entry & operator=(const string_type & value);

   Assign a string to the entry.

3.     entry & operator=(const std::vector< string_type > & value);

   Assign a set of strings to the entry; they will be seperated by ';' or ':'.

### `entry_type` public member functions

1.     std::vector< string_type > to_vector() const;

   Split the entry by ";" or ":" and return it as a vector. Used by PATH.

   Get the value as string. Get the name of this entry.

2.      entry(const entry &) = default;

   Copy Constructor.

3.     bool empty() const;

   Check if the entry is empty.

4.     void assign(const string_type & value);

   Assign a string to the value.

5.     void assign(const std::vector< string_type > & value);

   Assign a set of strings to the entry; they will be seperated by ';' or ':'.

6.     void append(const string_type & value);

   Append a string to the end of the entry, it will seperated by ';' or ':'.

7.     void clear();

   Reset the value.

8.     entry & operator+=(const string_type & value);

   Append a string to the end of the entry, it will seperated by ';' or ':'.