GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave_scalar_map Class Reference

#include "oct-map.h"

Collaboration diagram for octave_scalar_map:

Public Types

typedef octave_fields::const_iterator const_iterator
 
typedef const_iterator iterator
 

Public Member Functions

 octave_scalar_map (const octave_fields &k)
 
 octave_scalar_map (void)
 
 octave_scalar_map (const string_vector &k)
 
 octave_scalar_map (const octave_scalar_map &m)
 
 octave_scalar_map (const std::map< std::string, octave_value > &m)
 
void assign (const std::string &k, const octave_value &val)
 
const_iterator begin (void) const
 
void clear (void)
 
bool contains (const std::string &name) const
 
const octave_valuecontents (const_iterator p) const
 
octave_valuecontents (iterator p)
 
const octave_valuecontents (octave_idx_type i) const
 
octave_valuecontents (octave_idx_type i)
 
octave_value contents (const std::string &k) const
 
octave_valuecontents (const std::string &k)
 
void del (const std::string &k)
 
const_iterator end (void) const
 
string_vector fieldnames (void) const
 
octave_value getfield (const std::string &key) const
 
octave_idx_type index (const_iterator p) const
 
bool isfield (const std::string &name) const
 
std::string key (const_iterator p) const
 
string_vector keys (void) const
 
octave_idx_type nfields (void) const
 
octave_scalar_mapoperator= (const octave_scalar_map &m)
 
octave_scalar_map orderfields (void) const
 
octave_scalar_map orderfields (Array< octave_idx_type > &perm) const
 
octave_scalar_map orderfields (const octave_scalar_map &other, Array< octave_idx_type > &perm) const
 
void rmfield (const std::string &key)
 
const_iterator seek (const std::string &k) const
 
void setfield (const std::string &key, const octave_value &val)
 

Private Attributes

octave_fields xkeys
 
std::vector< octave_valuexvals
 

Friends

class octave_map
 

Detailed Description

Definition at line 152 of file oct-map.h.

Member Typedef Documentation

◆ const_iterator

◆ iterator

Definition at line 182 of file oct-map.h.

Constructor & Destructor Documentation

◆ octave_scalar_map() [1/5]

octave_scalar_map::octave_scalar_map ( const octave_fields k)
inline

Definition at line 157 of file oct-map.h.

◆ octave_scalar_map() [2/5]

octave_scalar_map::octave_scalar_map ( void  )
inline

Definition at line 160 of file oct-map.h.

◆ octave_scalar_map() [3/5]

octave_scalar_map::octave_scalar_map ( const string_vector k)
inline

Definition at line 162 of file oct-map.h.

◆ octave_scalar_map() [4/5]

octave_scalar_map::octave_scalar_map ( const octave_scalar_map m)
inline

Definition at line 165 of file oct-map.h.

◆ octave_scalar_map() [5/5]

octave_scalar_map::octave_scalar_map ( const std::map< std::string, octave_value > &  m)

Definition at line 171 of file oct-map.cc.

References i, and sz.

Member Function Documentation

◆ assign()

◆ begin()

const_iterator octave_scalar_map::begin ( void  ) const
inline

◆ clear()

void octave_scalar_map::clear ( void  )
inline

Definition at line 244 of file oct-map.h.

◆ contains()

bool octave_scalar_map::contains ( const std::string name) const
inline

Definition at line 213 of file oct-map.h.

References isfield, and name.

◆ contents() [1/6]

◆ contents() [2/6]

octave_value& octave_scalar_map::contents ( iterator  p)
inline

Definition at line 197 of file oct-map.h.

References p.

◆ contents() [3/6]

const octave_value& octave_scalar_map::contents ( octave_idx_type  i) const
inline

Definition at line 200 of file oct-map.h.

References i.

◆ contents() [4/6]

octave_value& octave_scalar_map::contents ( octave_idx_type  i)
inline

Definition at line 203 of file oct-map.h.

References i.

◆ contents() [5/6]

octave_value octave_scalar_map::contents ( const std::string k) const

Definition at line 249 of file oct-map.cc.

References getfield(), and k.

◆ contents() [6/6]

octave_value & octave_scalar_map::contents ( const std::string k)

Definition at line 255 of file oct-map.cc.

References octave_fields::getfield(), k, xkeys, and xvals.

◆ del()

void octave_scalar_map::del ( const std::string k)
inline

Definition at line 232 of file oct-map.h.

References k, and rmfield.

◆ end()

const_iterator octave_scalar_map::end ( void  ) const
inline

◆ fieldnames()

◆ getfield()

◆ index()

octave_idx_type octave_scalar_map::index ( const_iterator  p) const
inline

Definition at line 191 of file oct-map.h.

References p.

◆ isfield()

bool octave_scalar_map::isfield ( const std::string name) const
inline

Definition at line 210 of file oct-map.h.

References name.

◆ key()

std::string octave_scalar_map::key ( const_iterator  p) const
inline

Definition at line 189 of file oct-map.h.

References p.

Referenced by octave_scalar_struct::byte_size(), read_mat5_binary_element(), and save_fields().

◆ keys()

string_vector octave_scalar_map::keys ( void  ) const
inline

Definition at line 219 of file oct-map.h.

References fieldnames.

◆ nfields()

octave_idx_type octave_scalar_map::nfields ( void  ) const
inline

◆ operator=()

octave_scalar_map& octave_scalar_map::operator= ( const octave_scalar_map m)
inline

Definition at line 170 of file oct-map.h.

References xkeys, and xvals.

◆ orderfields() [1/3]

octave_scalar_map octave_scalar_map::orderfields ( void  ) const

Definition at line 209 of file oct-map.cc.

Referenced by permute_to_correct_order1().

◆ orderfields() [2/3]

octave_scalar_map octave_scalar_map::orderfields ( Array< octave_idx_type > &  perm) const

Definition at line 216 of file oct-map.cc.

References i, nfields(), retval, Array< T >::xelem(), xkeys, and xvals.

◆ orderfields() [3/3]

octave_scalar_map octave_scalar_map::orderfields ( const octave_scalar_map other,
Array< octave_idx_type > &  perm 
) const

◆ rmfield()

void octave_scalar_map::rmfield ( const std::string key)

Definition at line 201 of file oct-map.cc.

References k, octave_fields::rmfield(), xkeys, and xvals.

◆ seek()

const_iterator octave_scalar_map::seek ( const std::string k) const
inline

Definition at line 187 of file oct-map.h.

References k.

Referenced by octave_scalar_struct::subsasgn().

◆ setfield()

Friends And Related Function Documentation

◆ octave_map

friend class octave_map
friend

Definition at line 250 of file oct-map.h.

Member Data Documentation

◆ xkeys

octave_fields octave_scalar_map::xkeys
private

◆ xvals


The documentation for this class was generated from the following files: