// PhBInterpolatedMedium.H: PhBInterpolatedMedium 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 _PhBInterpolatedMedium_H_
#define _PhBInterpolatedMedium_H_

#include "xrml.H"
#include "PhBMedium.H"

// utility includes
// end of utility includes

namespace xrml {
#define PhBInterpolatedMediumTypeId 	"PhBInterpolatedMedium"
extern bool IsPhBInterpolatedMedium(SFNode*);

class PhBInterpolatedMedium: public virtual SFNode, public PhBMedium {
private:
  //
  void clone_here(const PhBInterpolatedMedium&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    fraction_updated = 0x1,
    key_updated = 0x2,
    keyMedia_updated = 0x4 
  };
  
protected:
  // raw children nodes (can be PROTO) + synchronize methods:
  MFNode 	_keyMedia;
  void 	synchronize_keyMedia(void);

public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  PhBInterpolatedMedium();
  PhBInterpolatedMedium(const PhBInterpolatedMedium&);
  PhBInterpolatedMedium& operator=(const PhBInterpolatedMedium&);
  virtual ~PhBInterpolatedMedium();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  SFFloat          	fraction;
  MFFloat          	key;
  array<PhBMedium*> 	keyMedia;
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_fraction(const SFFloat&);
  void             	set_key(const MFFloat&);
  void             	set_keyMedia(const MFNode&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_fraction(const SFFloat&);
  bool             	assign_key(const MFFloat&);
  bool             	assign_keyMedia(const MFNode&);
  
  // update status
  inline bool      	fraction_is_updated(void) { return (status & fraction_updated); }
  inline void      	fraction_clear_update(void) { status &= ~fraction_updated; }
  inline bool      	key_is_updated(void) { return (status & key_updated); }
  inline void      	key_clear_update(void) { status &= ~key_updated; }
  inline bool      	keyMedia_is_updated(void) { return (status & keyMedia_updated); }
  inline void      	keyMedia_clear_update(void) { status &= ~keyMedia_updated; }
  
  // utility members
  
protected:
  inline void util_init(void) { }
  inline void util_clone(const PhBInterpolatedMedium& src) { }
  inline void util_destruct(void) { }
};

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