home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftptest.leeds.ac.uk
/
2015.02.ftptest.leeds.ac.uk.tar
/
ftptest.leeds.ac.uk
/
bionet
/
CAE-GROUP
/
SCL-WIN3x
/
SCL.EXE
/
SENTITY.H
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-06
|
3KB
|
113 lines
#ifndef SENTITY_H
#define SENTITY_H 1
/*
* NIST STEP Core Class Library
* clstepcore/STEPentity.h
* February, 1994
* K. C. Morris
* David Sauder
* Development of this software was funded by the United States Government,
* and is not subject to copyright.
*/
/* $Id: STEPentity.h,v 2.0.1.2 1994/05/10 21:03:10 kc Exp $ */
#include <stdio.h>
#include <att_List.h>
#include <sdai.h>
class STEPattributeList;
class STEPattribute;
#include <ctype.h>
#include <Str.h>
class InstMgr;
class EntityDescriptor;
///////////////////////////////////////////////////////////////////////////////
class STEPentity {
private:
int _cur; // provides a built-in way of accessing attributes in order.
protected:
STEPattribute * GetSTEPattribute (const char *);
STEPattribute * MakeDerived (const char *);
public:
STEPattributeList attributes;
int STEPfile_id;
ErrorDescriptor _error;
// registry additions - DEL
EntityDescriptor *EntityDescriptor;
public:
STEPentity ();
virtual ~STEPentity();
int SetFileId(int fid) { return STEPfile_id = fid; }
int GetFileId() const { return STEPfile_id; }
int FileId (int fid) { return STEPfile_id = fid; }
int FileId() const { return STEPfile_id; }
const char *EntityName() const { return EntityDescriptor->Name(); }
enum Severity ValidLevel(ErrorDescriptor *error, InstMgr *im,
int clearError = 1);
ErrorDescriptor &Error() { return _error; }
// clears entity's error and optionally all attr's errors
void ClearError(int clearAttrs = 1);
// clears all attr's errors
void ClearAttrError();
// void EnforceOptionality(int on = 1);
STEPentity *Replicate();
// ACCESS attributes in order.
int AttributeCount();
STEPattribute * NextAttribute();
void ResetAttributes() { _cur =0; }
// READ
enum Severity STEPread(int id, int addFileId, class InstMgr * instance_set,
istream& in =cin);
void STEPread_error(char c, int index, istream& in);
// WRITE
void STEPwrite(ostream& out =cout);
const char * STEPwrite(SCLstring &buf);
void STEPwrite_reference (ostream& out =cout);
const char * STEPwrite_reference (SCLstring &buf);
void beginSTEPwrite(ostream& out =cout); // writes out the SCOPE section
void endSTEPwrite(ostream& out =cout);
protected:
void CopyAs (STEPentity *);
}
;
///////////////////////////////////////////////////////////////////////////////
extern STEPentity NilSTEPentity;
#define ENTITY_NULL &NilSTEPentity
#define NULL_ENTITY &NilSTEPentity
typedef STEPentity* STEPentityPtr;
typedef STEPentity* STEPentityH;
extern STEPentity *
ReadEntityRef(istream &in, ErrorDescriptor *err, char *tokenList,
InstMgr * instances, int addFileId);
//typedef STEPentity * (* Creator) () const;
//typedef STEPentity * (* Creator) () ;
#endif