g4tools  5.4.0
Public Member Functions | List of all members
tools::sg::sf_string Class Reference
Inheritance diagram for tools::sg::sf_string:
Inheritance graph
[legend]
Collaboration diagram for tools::sg::sf_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 &a_s)
 
 sf_string ()
 
 sf_string (const std::string &a_value)
 
virtual ~sf_string ()
 
 sf_string (const sf_string &a_from)
 
sf_stringoperator= (const sf_string &a_from)
 
sf_stringoperator= (const std::string &a_value)
 
- Public Member Functions inherited from tools::sg::bsf< std::string >
virtual void * cast (const std::string &a_class) const
 
virtual const std::string & s_cls () const
 
 bsf (const std::string &a_value)
 
 bsf (const bsf &a_from)
 
virtual ~bsf ()
 
bsfoperator= (const bsf &a_from)
 
bsfoperator= (const std::string &a_value)
 
bool operator== (const bsf &a_from) const
 
bool operator== (const std::string &a_value) const
 
bool operator!= (const bsf &a_from) const
 
bool operator!= (const std::string &a_value) const
 
 operator const std::string & () const
 
 operator std::string ()
 
std::string & value ()
 
const std::string & value () const
 
void value (const std::string &a_value)
 
void value_no_cmp (const std::string &a_value)
 
void setValue (const std::string &a_value)
 
const std::string & getValue () const
 
- 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

- Static Public Member Functions inherited from tools::sg::bsf< std::string >
static const std::string & s_class ()
 
- Protected Member Functions inherited from tools::sg::bsf< std::string >
 bsf ()
 
- Protected Member Functions inherited from tools::sg::field
 field ()
 
 field (const field &)
 
fieldoperator= (const field &)
 
- Protected Attributes inherited from tools::sg::bsf< std::string >
std::string m_value
 
- Protected Attributes inherited from tools::sg::field
bool m_touched
 

Detailed Description

Definition at line 15 of file sf_string.

Constructor & Destructor Documentation

◆ sf_string() [1/3]

tools::sg::sf_string::sf_string ( )
inline

Definition at line 41 of file sf_string.

41 :parent(){}

◆ sf_string() [2/3]

tools::sg::sf_string::sf_string ( const std::string &  a_value)
inline

Definition at line 42 of file sf_string.

42 :parent(a_value){}

◆ ~sf_string()

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

Definition at line 43 of file sf_string.

43 {}

◆ sf_string() [3/3]

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

Definition at line 45 of file sf_string.

45 :parent(a_from){}

Member Function Documentation

◆ dump()

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

Implements tools::sg::field.

Definition at line 28 of file sf_string.

28  {
29  a_out << m_value << std::endl;
30  return true;
31  }

◆ operator=() [1/2]

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

Definition at line 46 of file sf_string.

46  {
47  parent::operator=(a_from);
48  return *this;
49  }

◆ operator=() [2/2]

sf_string& tools::sg::sf_string::operator= ( const std::string &  a_value)
inline

Definition at line 51 of file sf_string.

51  {
52  parent::operator=(a_value);
53  return *this;
54  }

◆ read()

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

Implements tools::sg::field.

Definition at line 21 of file sf_string.

21  {
22  char* cstr = 0;
23  if(!a_buffer.read_cstr(cstr)) return false;
24  m_value = cstr;
25  str_del(cstr);
26  return true;
27  }

◆ s2value()

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

Implements tools::sg::field.

Definition at line 36 of file sf_string.

36  {
37  value(a_s);
38  return true;
39  }

◆ s_value()

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

Implements tools::sg::field.

Definition at line 32 of file sf_string.

32  {
33  a_s = m_value;
34  return true;
35  }

◆ write()

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

Implements tools::sg::field.

Definition at line 18 of file sf_string.

18  {
19  return a_buffer.write_cstr(m_value.c_str());
20  }

The documentation for this class was generated from the following file:
tools::sg::bsf< std::string >::m_value
std::string m_value
Definition: bsf:120
tools::sg::field::operator=
field & operator=(const field &)
Definition: field:57
tools::str_del
void str_del(char *&a_cstr)
Definition: cstr:66
tools::sg::bsf< std::string >::value
std::string & value()
Definition: bsf:98