// PhBInterpolatedSurface.H: PhBInterpolatedSurface 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 _PhBInterpolatedSurface_H_
#define _PhBInterpolatedSurface_H_

#include "xrml.H"
#include "PhBSurface.H"

// utility includes
// end of utility includes

namespace xrml {
#define PhBInterpolatedSurfaceTypeId 	"PhBInterpolatedSurface"
extern bool IsPhBInterpolatedSurface(SFNode*);

class PhBInterpolatedSurface: public virtual SFNode, public PhBSurface {
private:
  //
  void clone_here(const PhBInterpolatedSurface&);
  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,
    keySurfaces_updated = 0x4 
  };
  
protected:
  // raw children nodes (can be PROTO) + synchronize methods:
  MFNode 	_keySurfaces;
  void 	synchronize_keySurfaces(void);

public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  PhBInterpolatedSurface();
  PhBInterpolatedSurface(const PhBInterpolatedSurface&);
  PhBInterpolatedSurface& operator=(const PhBInterpolatedSurface&);
  virtual ~PhBInterpolatedSurface();
  
  //
  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<PhBSurface*> 	keySurfaces;
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_fraction(const SFFloat&);
  void             	set_key(const MFFloat&);
  void             	set_keySurfaces(const MFNode&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_fraction(const SFFloat&);
  bool             	assign_key(const MFFloat&);
  bool             	assign_keySurfaces(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      	keySurfaces_is_updated(void) { return (status & keySurfaces_updated); }
  inline void      	keySurfaces_clear_update(void) { status &= ~keySurfaces_updated; }
  
  // utility members
  
protected:
  inline void util_init(void) { }
  inline void util_clone(const PhBInterpolatedSurface& src) { }
  inline void util_destruct(void) { }
};

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