// Script.H: Script 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 _Script_H_
#define _Script_H_

#include "xrml.H"
#include "Children.H"

// utility includes
// end of utility includes

namespace xrml {
#define ScriptTypeId 	"Script"
extern bool IsScript(SFNode*);

class Script: public virtual SFNode, public Children {
private:
  //
  void clone_here(const Script&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    url_updated = 0x1,
    directOutput_updated = 0x2,
    mustEvaluate_updated = 0x4 
  };
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  Script();
  Script(const Script&);
  Script& operator=(const Script&);
  virtual ~Script();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  MFString         	url;
  SFBool           	directOutput;
  SFBool           	mustEvaluate;
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_url(const MFString&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_url(const MFString&);
  bool             	assign_directOutput(const SFBool&);
  bool             	assign_mustEvaluate(const SFBool&);
  
  // update status
  inline bool      	url_is_updated(void) { return (status & url_updated); }
  inline void      	url_clear_update(void) { status &= ~url_updated; }
  inline bool      	directOutput_is_updated(void) { return (status & directOutput_updated); }
  inline void      	directOutput_clear_update(void) { status &= ~directOutput_updated; }
  inline bool      	mustEvaluate_is_updated(void) { return (status & mustEvaluate_updated); }
  inline void      	mustEvaluate_clear_update(void) { status &= ~mustEvaluate_updated; }
  
  // utility members
  void load_implementation(void);

protected:
  inline void util_init(void) { }
  inline void util_clone(const Script& src) { }
  inline void util_destruct(void) { }
};

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