// Anchor.H: Anchor 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 _Anchor_H_
#define _Anchor_H_

#include "xrml.H"
#include "PointingDeviceSensor.H"
#include "Grouping.H"
#include "Children.H"

// utility includes
// end of utility includes

namespace xrml {
#define AnchorTypeId 	"Anchor"
extern bool IsAnchor(SFNode*);

class Anchor: public virtual SFNode, public PointingDeviceSensor, public Grouping, public Children {
private:
  //
  void clone_here(const Anchor&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    children_updated = 0x1,
    description_updated = 0x2,
    parameter_updated = 0x4,
    url_updated = 0x8,
    bboxCenter_updated = 0x10,
    bboxSize_updated = 0x20 
  };
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  Anchor();
  Anchor(const Anchor&);
  Anchor& operator=(const Anchor&);
  virtual ~Anchor();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  //  array<Children*> 	children;
  SFString         	description;
  MFString         	parameter;
  MFString         	url;
  //  SFVec3f          	bboxCenter;
  //  SFVec3f          	bboxSize;
  
  // eventIns:
  void             	addChildren(const MFNode&);
  void             	removeChildren(const MFNode&);
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_children(const MFNode&);
  void             	set_description(const SFString&);
  void             	set_parameter(const MFString&);
  void             	set_url(const MFString&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_children(const MFNode&);
  bool             	assign_description(const SFString&);
  bool             	assign_parameter(const MFString&);
  bool             	assign_url(const MFString&);
  bool             	assign_bboxCenter(const SFVec3f&);
  bool             	assign_bboxSize(const SFVec3f&);
  
  // update status
  inline bool      	children_is_updated(void) { return (status & children_updated); }
  inline void      	children_clear_update(void) { status &= ~children_updated; }
  inline bool      	description_is_updated(void) { return (status & description_updated); }
  inline void      	description_clear_update(void) { status &= ~description_updated; }
  inline bool      	parameter_is_updated(void) { return (status & parameter_updated); }
  inline void      	parameter_clear_update(void) { status &= ~parameter_updated; }
  inline bool      	url_is_updated(void) { return (status & url_updated); }
  inline void      	url_clear_update(void) { status &= ~url_updated; }
  inline bool      	bboxCenter_is_updated(void) { return (status & bboxCenter_updated); }
  inline void      	bboxCenter_clear_update(void) { status &= ~bboxCenter_updated; }
  inline bool      	bboxSize_is_updated(void) { return (status & bboxSize_updated); }
  inline void      	bboxSize_clear_update(void) { status &= ~bboxSize_updated; }
  
  // utility members
  
protected:
  inline void util_init(void) { }
  inline void util_clone(const Anchor& src) { }
  inline void util_destruct(void) { }
};

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