// PhBSampledSpectrum.H: PhBSampledSpectrum 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 _PhBSampledSpectrum_H_
#define _PhBSampledSpectrum_H_

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

// utility includes
// end of utility includes

namespace xrml {
#define PhBSampledSpectrumTypeId 	"PhBSampledSpectrum"
extern bool IsPhBSampledSpectrum(SFNode*);

class PhBSampledSpectrum: public virtual SFNode, public PhBSpectrum {
private:
  //
  void clone_here(const PhBSampledSpectrum&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    samples_updated = 0x1,
    scale_updated = 0x2,
    min_updated = 0x4,
    max_updated = 0x8 
  };
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  PhBSampledSpectrum();
  PhBSampledSpectrum(const PhBSampledSpectrum&);
  PhBSampledSpectrum& operator=(const PhBSampledSpectrum&);
  virtual ~PhBSampledSpectrum();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  MFFloat          	samples;
  SFFloat          	scale;
  SFFloat          	min;
  SFFloat          	max;
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_samples(const MFFloat&);
  void             	set_scale(const SFFloat&);
  void             	set_min(const SFFloat&);
  void             	set_max(const SFFloat&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_samples(const MFFloat&);
  bool             	assign_scale(const SFFloat&);
  bool             	assign_min(const SFFloat&);
  bool             	assign_max(const SFFloat&);
  
  // update status
  inline bool      	samples_is_updated(void) { return (status & samples_updated); }
  inline void      	samples_clear_update(void) { status &= ~samples_updated; }
  inline bool      	scale_is_updated(void) { return (status & scale_updated); }
  inline void      	scale_clear_update(void) { status &= ~scale_updated; }
  inline bool      	min_is_updated(void) { return (status & min_updated); }
  inline void      	min_clear_update(void) { status &= ~min_updated; }
  inline bool      	max_is_updated(void) { return (status & max_updated); }
  inline void      	max_clear_update(void) { status &= ~max_updated; }
  
  // utility members
  
protected:
  inline void util_init(void) { }
  inline void util_clone(const PhBSampledSpectrum& src) { }
  inline void util_destruct(void) { }
};

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