// PhBTabulatedSpectrum.H: PhBTabulatedSpectrum nodes.

// This file has been generated using nodegen 0.5a.
// Restrict manual editing to the sections delimited by
// . the comments "utility includes" and "end of utility includes"
// . the comments "utility members" and "end of utility members"

#ifndef _PhBTabulatedSpectrum_H_
#define _PhBTabulatedSpectrum_H_

#include "xrml.H"
#include "PhBSpectrum.H"

// utility includes
// end of utility includes

namespace xrml {
#define PhBTabulatedSpectrumTypeId 	"PhBTabulatedSpectrum"
extern bool IsPhBTabulatedSpectrum(SFNode*);

class PhBTabulatedSpectrum: public virtual SFNode, public PhBSpectrum {
private:
  //
  void clone_here(const PhBTabulatedSpectrum&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    wavelengths_updated = 0x1,
    values_updated = 0x2,
    scale_updated = 0x4 
  };
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  PhBTabulatedSpectrum();
  PhBTabulatedSpectrum(const PhBTabulatedSpectrum&);
  PhBTabulatedSpectrum& operator=(const PhBTabulatedSpectrum&);
  virtual ~PhBTabulatedSpectrum();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  MFFloat          	wavelengths;
  MFFloat          	values;
  SFFloat          	scale;
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_wavelengths(const MFFloat&);
  void             	set_values(const MFFloat&);
  void             	set_scale(const SFFloat&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_wavelengths(const MFFloat&);
  bool             	assign_values(const MFFloat&);
  bool             	assign_scale(const SFFloat&);
  
  // update status
  inline bool      	wavelengths_is_updated(void) { return (status & wavelengths_updated); }
  inline void      	wavelengths_clear_update(void) { status &= ~wavelengths_updated; }
  inline bool      	values_is_updated(void) { return (status & values_updated); }
  inline void      	values_clear_update(void) { status &= ~values_updated; }
  inline bool      	scale_is_updated(void) { return (status & scale_updated); }
  inline void      	scale_clear_update(void) { status &= ~scale_updated; }
  
  // utility members
  
protected:
  inline void util_init(void) { }
  inline void util_clone(const PhBTabulatedSpectrum& src) { }
  inline void util_destruct(void) { }
};

// end of utility members
} // namespace xrml
#endif /*_PhBTabulatedSpectrum_H_*/
