inlib  1.2.0
Public Member Functions | Public Attributes
inlib::sg::line_style Class Reference
Inheritance diagram for inlib::sg::line_style:
Inheritance graph
[legend]
Collaboration diagram for inlib::sg::line_style:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual nodecopy () const
virtual const std::string & s_cls () const
 line_style ()
virtual ~line_style ()
 line_style (const line_style &a_from)
line_styleoperator= (const line_style &a_from)
bool from_string (std::ostream &a_out, const cmaps_t &a_cmaps, const std::string &a_s)

Public Attributes

sf< bool > visible
sf_vec< colorf, float > color
sf< float > transparency
sf< float > width
sf< lpatpattern

Detailed Description

Definition at line 18 of file line_style.


Constructor & Destructor Documentation

inlib::sg::line_style::line_style ( ) [inline]

Definition at line 41 of file line_style.

  :node()
  ,visible(true)
  ,color(colorf::black())
  ,transparency(0)
  ,width(1)
  ,pattern(line_solid)
  {
    add_fields();
  }
virtual inlib::sg::line_style::~line_style ( ) [inline, virtual]

Definition at line 51 of file line_style.

{}
inlib::sg::line_style::line_style ( const line_style a_from) [inline]

Definition at line 53 of file line_style.

  :node(a_from)
  ,visible(a_from.visible)
  ,color(a_from.color)
  ,transparency(a_from.transparency)
  ,width(a_from.width)
  ,pattern(a_from.pattern)
  {
    add_fields();
  }

Member Function Documentation

virtual node* inlib::sg::line_style::copy ( ) const [inline, virtual]

Implements inlib::sg::node.

Definition at line 38 of file line_style.

{return new line_style(*this);}
bool inlib::sg::line_style::from_string ( std::ostream &  a_out,
const cmaps_t a_cmaps,
const std::string &  a_s 
) [inline]

Definition at line 74 of file line_style.

                                               {
    style_parser sp;

    sp.visible(visible.value());
    sp.color(color.value());
    sp.transparency(transparency.value());
    sp.line_width(width.value());
    sp.line_pattern(pattern.value());

    if(!sp.parse(a_out,a_cmaps,a_s)) {
      a_out << "inlib::sg::line_style::from_string :"
            << " parse failed."
            << std::endl;
      return false;    
    }

    visible.value(sp.visible());
    color.value(sp.color());
    transparency.value(sp.transparency());
    width.value(sp.line_width());
    pattern.value(sp.line_pattern());

    return true;
  }
line_style& inlib::sg::line_style::operator= ( const line_style a_from) [inline]

Definition at line 63 of file line_style.

                                                 {
    node::operator=(a_from);

    visible = a_from.visible;
    color = a_from.color;
    transparency = a_from.transparency;
    width = a_from.width;
    pattern = a_from.pattern;
    return *this;
  }
virtual const std::string& inlib::sg::line_style::s_cls ( ) const [inline, virtual]

Implements inlib::sg::node.

Definition at line 39 of file line_style.

{return s_class();}

Member Data Documentation

Definition at line 25 of file line_style.

Definition at line 28 of file line_style.

Definition at line 26 of file line_style.

Definition at line 24 of file line_style.

Definition at line 27 of file line_style.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines