File indexing completed on 2025-01-18 10:04:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _Message_Msg_HeaderFile
0017 #define _Message_Msg_HeaderFile
0018
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 #include <Standard_Handle.hxx>
0022
0023 #include <TCollection_HAsciiString.hxx>
0024 #include <TCollection_HExtendedString.hxx>
0025 #include <TColStd_SequenceOfInteger.hxx>
0026
0027 class TCollection_AsciiString;
0028 class TCollection_HAsciiString;
0029 class TCollection_HExtendedString;
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052 class Message_Msg
0053 {
0054 public:
0055
0056 DEFINE_STANDARD_ALLOC
0057
0058
0059
0060 Standard_EXPORT Message_Msg();
0061
0062
0063 Standard_EXPORT Message_Msg(const Message_Msg& theMsg);
0064
0065
0066 Standard_EXPORT Message_Msg(const Standard_CString theKey);
0067
0068
0069 Standard_EXPORT Message_Msg(const TCollection_ExtendedString& theKey);
0070
0071
0072
0073 Standard_EXPORT void Set (const Standard_CString theMsg);
0074
0075
0076
0077 Standard_EXPORT void Set (const TCollection_ExtendedString& theMsg);
0078
0079
0080 Standard_EXPORT Message_Msg& Arg (const Standard_CString theString);
0081 Message_Msg& operator << (const Standard_CString theString)
0082 {
0083 return Arg(theString);
0084 }
0085
0086
0087 Message_Msg& Arg (const TCollection_AsciiString& theString);
0088 Message_Msg& operator << (const TCollection_AsciiString& theString)
0089 {
0090 return Arg(theString);
0091 }
0092
0093
0094 Message_Msg& Arg (const Handle(TCollection_HAsciiString)& theString);
0095 Message_Msg& operator << (const Handle(TCollection_HAsciiString)& theString)
0096 {
0097 return Arg(theString);
0098 }
0099
0100
0101 Standard_EXPORT Message_Msg& Arg (const TCollection_ExtendedString& theString);
0102 Message_Msg& operator << (const TCollection_ExtendedString& theString)
0103 {
0104 return Arg(theString);
0105 }
0106
0107
0108 Message_Msg& Arg (const Handle(TCollection_HExtendedString)& theString);
0109 Message_Msg& operator << (const Handle(TCollection_HExtendedString)& theString)
0110 {
0111 return Arg(theString);
0112 }
0113
0114
0115 Standard_EXPORT Message_Msg& Arg (const Standard_Integer theInt);
0116 Message_Msg& operator << (const Standard_Integer theInt)
0117 {
0118 return Arg(theInt);
0119 }
0120
0121
0122 Standard_EXPORT Message_Msg& Arg (const Standard_Real theReal);
0123 Message_Msg& operator << (const Standard_Real theReal)
0124 {
0125 return Arg(theReal);
0126 }
0127
0128
0129 const TCollection_ExtendedString& Original() const;
0130
0131
0132
0133 const TCollection_ExtendedString& Value() const;
0134
0135
0136 Standard_Boolean IsEdited() const;
0137
0138
0139
0140
0141
0142 Standard_EXPORT const TCollection_ExtendedString& Get();
0143 operator const TCollection_ExtendedString& () { return Get(); }
0144
0145
0146
0147
0148 protected:
0149
0150
0151
0152
0153
0154 private:
0155
0156
0157 Standard_EXPORT Standard_Integer getFormat (const Standard_Integer theType, TCollection_AsciiString& theFormat);
0158
0159 Standard_EXPORT void replaceText (const Standard_Integer theFirst, const Standard_Integer theNb, const TCollection_ExtendedString& theStr);
0160
0161
0162 TCollection_ExtendedString myOriginal;
0163 TCollection_ExtendedString myMessageBody;
0164 TColStd_SequenceOfInteger mySeqOfFormats;
0165
0166
0167 };
0168
0169
0170 #include <Message_Msg.lxx>
0171
0172
0173
0174
0175
0176 #endif