-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathsdaiString.h
More file actions
60 lines (48 loc) · 1.45 KB
/
sdaiString.h
File metadata and controls
60 lines (48 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef STEPSTRING_H
#define STEPSTRING_H 1
/*
* NIST STEP Core Class Library
* clstepcore/sdaiString.h
* April 1997
* KC Morris
* Development of this software was funded by the United States Government,
* and is not subject to copyright.
*/
#include <sc_export.h>
#include <string>
#include <limits>
class SC_DAI_EXPORT SDAI_String {
private:
#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( disable: 4251 )
#endif
std::string content;
#ifdef _MSC_VER
#pragma warning( pop )
#endif
public:
//constructor(s) & destructor
SDAI_String( const char * str = "", size_t max = std::string::npos );
SDAI_String( const std::string & s );
SDAI_String( const SDAI_String & s );
~SDAI_String( void );
// operators
SDAI_String & operator= ( const char * s );
SDAI_String & operator= ( const SDAI_String & s );
bool operator== ( const char * s ) const;
void clear( void );
bool empty( void ) const;
const char * c_str( void ) const;
// format for STEP
const char * asStr( std::string & s ) const {
s = c_str();
return s.c_str();
}
void STEPwrite( ostream & out = cout ) const;
void STEPwrite( std::string & s ) const;
Severity StrToVal( const char * s );
Severity STEPread( istream & in, ErrorDescriptor * err );
Severity STEPread( const char * s, ErrorDescriptor * err );
};
#endif