#ifndef __USER3DSAMPLE_H
#define __USER3DSAMPLE_H

#ifndef __KERN_USER_H
#include "user.h"
#endif

class Ufile;
class UobjA;
//------------ user-written c++ codes "UserSample" -----------
const unsigned long ulCpCodeSAMPLE = 2001;
class UserSample : public User {
  private:
    double dx;
		double dy;
		int    ix;
		int    iy;
		bool   bx;
		bool   by;
		UobjA **uobjaArray;
  public:
    // Creators
    UserSample(bool bRegister=false);
    ~UserSample(void);
    // Accessors
    const char *Name(void) const;
    unsigned long Version(void) const { return 1; }
    const char **FunctionNames(void) const;
    const char **PlotFunctionNames(void) const;
    const char **IntVariableNames(void) const;
    const char **DoubleVariableNames(void) const;
    const char **BoolVariableNames(void) const;
    int ReturnIntVariable(int iN) const;
    double ReturnDoubleVariable(int iN) const;
    bool ReturnBoolVariable(int iN) const;
    // Manipulators
    User *Clone(void) const { return new UserSample; }
    void Execute(int iN); 
		void Function1(void);
		void Function2(void);
		void Function3(void);
		void Function4(void);
		void Function5(void);
		void Function6(void);
    void ExecutePlot(int iN, UcppPlotItem *upi);
		void PlotFunction1(UcppPlotItem *upi);
		void PlotFunction2(UcppPlotItem *upi);
		void PlotFunction3(UcppPlotItem *upi);
    void AcceptIntVariable(int iN, int iV);
    void AcceptDoubleVariable(int iN, double dV);
    void AcceptBoolVariable(int iN, bool bV);
    // Save & Restore
		void write(Ufile &fi) const;
		void read(Ufile &fi);
		void remap(void) {}
    // user functions
    void TraverseAllBallsContact_100(void);
    void sendBalls(void); 
    void receiveBalls(void);
    void assignUdmProperties(void);
    void assignUdmProperties2(void);
};



#endif