// Group.H: Group 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 _Group_H_
#define _Group_H_

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

// utility includes
// end of utility includes

namespace xrml {
#define GroupTypeId 	"Group"
extern bool IsGroup(SFNode*);

class Group: public virtual SFNode, public Grouping, public Children {
private:
  //
  void clone_here(const Group&);
  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,
    bboxCenter_updated = 0x2,
    bboxSize_updated = 0x4 
  };
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  Group();
  Group(const Group&);
  Group& operator=(const Group&);
  virtual ~Group();
  
  //
  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;
  //  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&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_children(const MFNode&);
  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      	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 Group& src) { }
  inline void util_destruct(void) { }
};

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