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
/
SELECT.H
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-06
|
3KB
|
102 lines
#ifndef _SELECT_H
#define _SELECT_H
/*
* NIST STEP Core Class Library
* clstepcore/STEPselect.h
* February, 1994
* Dave Helfrick
* KC Morris
* Development of this software was funded by the United States Government,
* and is not subject to copyright.
*/
/* $Id: STEPselect.h,v 2.0.1.3 1994/06/06 14:48:28 kc Exp $ */
#include <baseType.h>
#include <scl_string.h>
#include <sdai.h>
#include <errordesc.h>
#include <read_func.h>
class TypeDescriptor;
class SelectTypeDescriptor;
class InstMgr;
/**********
class definition for the select superclass SdaiSelect.
**********/
class SdaiSelect {
protected:
const SelectTypeDescriptor *_type;
const TypeDescriptor * underlying_type;
BASE_TYPE base_type; // used by the subtypes
SdaiString val;
ErrorDescriptor _error;
const TypeDescriptor * SetUnderlyingType (const TypeDescriptor *);
const TypeDescriptor * CanBe (const char *) const;
const TypeDescriptor * CanBe (BASE_TYPE) const;
const TypeDescriptor * CanBe (const TypeDescriptor * td) const;
virtual const TypeDescriptor * AssignEntity (STEPentity * se) =0;
virtual SdaiSelect * NewSelect () =0;
public:
Severity severity() const;
Severity severity( Severity );
const char *Error();
void Error( char * );
// clears select's error
void ClearError();
// clears error
// constructors
SdaiSelect (const SelectTypeDescriptor * s =0,
const TypeDescriptor * td =0)
: _type (s), underlying_type (td) { }
virtual ~SdaiSelect () { };
// from SDAI binding
SdaiString UnderlyingTypeName () const;
const TypeDescriptor * CurrentUnderlyingType() const;
int exists() const;
void nullify();
Severity SelectValidLevel(const char *attrValue, ErrorDescriptor *err,
InstMgr *im, int clearError);
// reading and writing
const char * STEPwrite(SCLstring& s) const;
void STEPwrite (ostream& out =cout) const;
virtual void STEPwrite_content (ostream& out) const =0;
// char * asStr() const;
Severity StrToVal(const char *val, const char *selectType,
ErrorDescriptor *err, InstMgr * instances =0);
virtual Severity StrToVal_content (const char *,
InstMgr * instances =0) =0;
Severity STEPread(istream& in, ErrorDescriptor *err,
InstMgr * instances = 0, int addFileId =0);
// abstract function
virtual Severity STEPread_content (istream& in =cin,
InstMgr * instances =0,
int addFileId =0) =0;
// the following functions may need changed or removed...
// SdaiSelect& operator =( SdaiSelect& );
int set_null();
int is_null();
}; /** end class **/
typedef SdaiSelect * SdaiSelectH ;
#endif