g4tools  5.4.0
Public Member Functions | List of all members
tools::sg::mf_string Class Reference
Inheritance diagram for tools::sg::mf_string:
Inheritance graph
[legend]
Collaboration diagram for tools::sg::mf_string:
Collaboration graph
[legend]

Public Member Functions

virtual bool write (io::iwbuf &a_buffer)
 
virtual bool read (io::irbuf &a_buffer)
 
virtual bool dump (std::ostream &a_out)
 
virtual bool s_value (std::string &a_s) const
 
virtual bool s2value (const std::string &)
 
 mf_string ()
 
 mf_string (const std::string &a_v)
 
 mf_string (const std::vector< std::string > &a_v)
 
virtual ~mf_string ()
 
 mf_string (const mf_string &a_from)
 
mf_stringoperator= (const mf_string &a_from)
 
mf_stringoperator= (const std::vector< std::string > &a_value)
 
mf_stringoperator= (const char *a_cstr)
 
- Public Member Functions inherited from tools::sg::bmf< std::string >
virtual void * cast (const std::string &a_class) const
 
virtual const std::string & s_cls () const
 
 bmf ()
 
 bmf (const std::string &a_value)
 
 bmf (const std::vector< std::string > &a_v)
 
 bmf (const bmf &a_from)
 
virtual ~bmf ()
 
bmfoperator= (const bmf &a_from)
 
bmfoperator= (const std::vector< std::string > &a_from)
 
bmfoperator= (const std::string &a_v)
 
bool operator== (const bmf &a_from) const
 
bool operator!= (const bmf &a_from) const
 
const std::string & operator[] (size_t a_index) const
 
std::string & operator[] (size_t a_index)
 
size_t size () const
 
bool empty () const
 
const std::vector< std::string > & values () const
 
std::vector< std::string > & values ()
 
void add (const std::string &a_value)
 
void add (const std::vector< std::string > &a_vals)
 
void add_allocated (size_t &a_pos, const std::string &a_1, const std::string &a_2, const std::string &a_3)
 
void insert (const it_t &a_it, const std::string &a_value)
 
bool set_value (size_t a_index, const std::string &a_value)
 
void set_value (const std::string &a_value)
 
bool get_value (size_t a_index, std::string &a_value)
 
void clear ()
 
void set_values (const std::vector< std::string > &a_values)
 
bool setValues (size_t a_index, size_t a_num, const std::string *a_vs)
 
bool set1Value (size_t a_index, const std::string &a_value)
 
bool setValue (const std::string &a_value)
 
size_t getNum () const
 
std::string * getValues (size_t a_start)
 
- Public Member Functions inherited from tools::sg::field
virtual const std::string & s_cls () const =0
 
virtual ~field ()
 
void touch ()
 
bool touched () const
 
void reset_touched ()
 

Additional Inherited Members

- Public Types inherited from tools::sg::bmf< std::string >
typedef std::vector< std::string >::iterator it_t
 
- Static Public Member Functions inherited from tools::sg::bmf< std::string >
static const std::string & s_class ()
 
- Protected Member Functions inherited from tools::sg::field
 field ()
 
 field (const field &)
 
fieldoperator= (const field &)
 
- Protected Attributes inherited from tools::sg::bmf< std::string >
std::vector< std::string > m_values
 
- Protected Attributes inherited from tools::sg::field
bool m_touched
 

Detailed Description

Definition at line 76 of file mf.

Constructor & Destructor Documentation

◆ mf_string() [1/4]

tools::sg::mf_string::mf_string ( )
inline

Definition at line 98 of file mf.

98 :parent(){}

◆ mf_string() [2/4]

tools::sg::mf_string::mf_string ( const std::string &  a_v)
inline

Definition at line 99 of file mf.

99 :parent(a_v){}

◆ mf_string() [3/4]

tools::sg::mf_string::mf_string ( const std::vector< std::string > &  a_v)
inline

Definition at line 100 of file mf.

100 :parent(a_v){}

◆ ~mf_string()

virtual tools::sg::mf_string::~mf_string ( )
inlinevirtual

Definition at line 101 of file mf.

101 {}

◆ mf_string() [4/4]

tools::sg::mf_string::mf_string ( const mf_string a_from)
inline

Definition at line 103 of file mf.

103 :parent(a_from){}

Member Function Documentation

◆ dump()

virtual bool tools::sg::mf_string::dump ( std::ostream &  a_out)
inlinevirtual

Implements tools::sg::field.

Definition at line 86 of file mf.

86  {
87  const std::vector<std::string>& vec = parent::m_values;
88  a_out << "size : " << vec.size() << std::endl;
89  std::vector<std::string>::const_iterator it;
90  for(it=vec.begin();it!=vec.end();++it) {
91  a_out << " \"" << (*it) << "\"" << std::endl;
92  }
93  return true;
94  }

◆ operator=() [1/3]

mf_string& tools::sg::mf_string::operator= ( const char *  a_cstr)
inline

Definition at line 113 of file mf.

113  {
114  parent::operator=(a_cstr);
115  return *this;
116  }

◆ operator=() [2/3]

mf_string& tools::sg::mf_string::operator= ( const mf_string a_from)
inline

Definition at line 104 of file mf.

104  {
105  parent::operator=(a_from);
106  return *this;
107  }

◆ operator=() [3/3]

mf_string& tools::sg::mf_string::operator= ( const std::vector< std::string > &  a_value)
inline

Definition at line 109 of file mf.

109  {
110  parent::operator=(a_value);
111  return *this;
112  }

◆ read()

virtual bool tools::sg::mf_string::read ( io::irbuf a_buffer)
inlinevirtual

Implements tools::sg::field.

Definition at line 82 of file mf.

82  {
83  std::vector<std::string>& vec = parent::m_values;
84  return a_buffer.read_vec(vec);
85  }

◆ s2value()

virtual bool tools::sg::mf_string::s2value ( const std::string &  )
inlinevirtual

Implements tools::sg::field.

Definition at line 96 of file mf.

96 {return false;}

◆ s_value()

virtual bool tools::sg::mf_string::s_value ( std::string &  a_s) const
inlinevirtual

Implements tools::sg::field.

Definition at line 95 of file mf.

95 {a_s.clear();return false;}

◆ write()

virtual bool tools::sg::mf_string::write ( io::iwbuf a_buffer)
inlinevirtual

Implements tools::sg::field.

Definition at line 79 of file mf.

79  {
80  return a_buffer.write_vec(m_values);
81  }

The documentation for this class was generated from the following file:
tools::sg::field::operator=
field & operator=(const field &)
Definition: field:57
tools::sg::bmf< std::string >::m_values
std::vector< std::string > m_values
Definition: bmf:163