/*  $Id:$
 */

#ifndef afc_Entity_h

#define afc_Entity_h


/** {secret} **/
#include <ads/adslib.h>

#include <ads/ads.h>

#include <string.h>

#include <afc/Strings.h>



/**
 ** Osnovni razred za gradnike v ACAD, ki skrbi za zajem podatkov, kot
 ** tudi gradnjo in popravke v .DWG
 **/
class Entity
{
private:
  ads_name name;
  Strings DXFname;
  ads_point point;
  ads_point pickPoint;
  Strings layer;
  short hasXdata;

public:
  Strings handle;
  Strings tag;
  Strings nodeName;
  int TempZone;

  Entity();
  Entity(ads_name name);
  virtual ~Entity();
  Modify();
  ads_real GetPoint(int i);
  void GetHandle();
  int GetNodeName();
  Strings GetDXFName();
  Strings GetLayer();
  void GetTag();
  SaveTag(const char *tag, const char *value, const char *appName);
  SaveTag(const char *tag, int value, const char *appName);
  SaveTag(const char *tag, ads_real value, const char *appName);
  SaveTag(const char *tag, long value, const char *appName);
  SaveTag(const char *tag, ads_point value, const char *appName);
  struct resbuf * GetResBuf();
  int Pick(char *prompt);
  int Get();
  int Get(ads_name entname);
  void Release();
  static void Register(const char *appName);
  static void UnRegister();
  long PipeNum();

protected:
  struct resbuf *rb;
  static struct resbuf *apps;

};


union ads_u_val *getXdata (struct resbuf * rb, const char *name);
union ads_u_val *assoc (short dxfval, struct resbuf * rb);
int isA(const char *name, struct resbuf *rb);



#endif




syntax highlighted by Code2HTML, v. 0.9.1