GNU Octave  6.2.0
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 (const octave_scalar_map &m)
 
 octave_scalar_map (const std::map< std::string, octave_value > &m)
 
 octave_scalar_map (const string_vector &k)
 
 octave_scalar_map (void)
 
void assign (const std::string &k, const octave_value &val)
 
const_iterator begin (void) const
 
const_iterator cbegin (void) const
 
const_iterator cend (void) const
 
void clear (void)
 
bool contains (const std::string &name) const
 
octave_valuecontents (const std::string &k)
 
octave_value contents (const std::string &k) const
 
const octave_valuecontents (const_iterator p) const
 
octave_valuecontents (iterator p)
 
octave_valuecontents (octave_idx_type i)
 
const octave_valuecontents (octave_idx_type i) const
 
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 (Array< octave_idx_type > &perm) const
 
octave_scalar_map orderfields (const octave_scalar_map &other, Array< octave_idx_type > &perm) const
 
octave_scalar_map orderfields (void) 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 160 of file oct-map.h.

Member Typedef Documentation

◆ const_iterator

◆ iterator

Definition at line 190 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 165 of file oct-map.h.

◆ octave_scalar_map() [2/5]

octave_scalar_map::octave_scalar_map ( void  )
inline

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

◆ octave_scalar_map() [3/5]

octave_scalar_map::octave_scalar_map ( const string_vector k)
inline

Definition at line 170 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 173 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 169 of file oct-map.cc.

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

Member Function Documentation

◆ assign()

◆ begin()

const_iterator octave_scalar_map::begin ( void  ) const
inline

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

Referenced by read_mat5_binary_element().

◆ cbegin()

const_iterator octave_scalar_map::cbegin ( void  ) const
inline

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

Referenced by octave_scalar_struct::byte_size().

◆ cend()

const_iterator octave_scalar_map::cend ( void  ) const
inline

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

Referenced by octave_scalar_struct::byte_size().

◆ clear()

void octave_scalar_map::clear ( void  )
inline

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

◆ contains()

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

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

References name.

Referenced by Flasterror(), and Frethrow().

◆ contents() [1/6]

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

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

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

◆ contents() [2/6]

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

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

References getfield().

◆ contents() [3/6]

◆ contents() [4/6]

octave_value& octave_scalar_map::contents ( iterator  p)
inline

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

◆ contents() [5/6]

octave_value& octave_scalar_map::contents ( octave_idx_type  i)
inline

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

◆ contents() [6/6]

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

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

◆ del()

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

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

◆ end()

const_iterator octave_scalar_map::end ( void  ) const
inline

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

Referenced by read_mat5_binary_element(), and octave_scalar_struct::subsasgn().

◆ fieldnames()

string_vector octave_scalar_map::fieldnames ( void  ) const
inline

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

Referenced by octave_scalar_struct::print_raw().

◆ getfield()

◆ index()

octave_idx_type octave_scalar_map::index ( const_iterator  p) const
inline

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

◆ isfield()

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

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

References name.

◆ key()

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

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

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

◆ keys()

string_vector octave_scalar_map::keys ( void  ) const
inline

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

◆ 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 178 of file oct-map.h.

References m.

◆ orderfields() [1/3]

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

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

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

◆ orderfields() [2/3]

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

◆ orderfields() [3/3]

octave_scalar_map octave_scalar_map::orderfields ( void  ) const

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

Referenced by permute_to_correct_order1().

◆ rmfield()

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

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

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

◆ seek()

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

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

Referenced by octave_scalar_struct::subsasgn().

◆ setfield()

Friends And Related Function Documentation

◆ octave_map

friend class octave_map
friend

Definition at line 261 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: