File indexing completed on 2026-09-14 09:15: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 <Standard_Integer.hxx>
0026 #include <NCollection_Sequence.hxx>
0027
0028 class TCollection_AsciiString;
0029 class TCollection_HAsciiString;
0030 class TCollection_HExtendedString;
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 DEFINE_STANDARD_ALLOC
0056
0057
0058 Standard_EXPORT Message_Msg();
0059
0060
0061 Standard_EXPORT Message_Msg(const Message_Msg& theMsg);
0062
0063
0064 Standard_EXPORT Message_Msg(const char* const theKey);
0065
0066
0067 Standard_EXPORT Message_Msg(const TCollection_ExtendedString& theKey);
0068
0069
0070
0071 Standard_EXPORT void Set(const char* const theMsg);
0072
0073
0074
0075 Standard_EXPORT void Set(const TCollection_ExtendedString& theMsg);
0076
0077
0078 Standard_EXPORT Message_Msg& Arg(const char* const theString);
0079
0080 Message_Msg& operator<<(const char* const theString) { return Arg(theString); }
0081
0082
0083 Message_Msg& Arg(const TCollection_AsciiString& theString);
0084
0085 Message_Msg& operator<<(const TCollection_AsciiString& theString) { return Arg(theString); }
0086
0087
0088 Message_Msg& Arg(const occ::handle<TCollection_HAsciiString>& theString);
0089
0090 Message_Msg& operator<<(const occ::handle<TCollection_HAsciiString>& theString)
0091 {
0092 return Arg(theString);
0093 }
0094
0095
0096 Standard_EXPORT Message_Msg& Arg(const TCollection_ExtendedString& theString);
0097
0098 Message_Msg& operator<<(const TCollection_ExtendedString& theString) { return Arg(theString); }
0099
0100
0101 Message_Msg& Arg(const occ::handle<TCollection_HExtendedString>& theString);
0102
0103 Message_Msg& operator<<(const occ::handle<TCollection_HExtendedString>& theString)
0104 {
0105 return Arg(theString);
0106 }
0107
0108
0109 Standard_EXPORT Message_Msg& Arg(const int theInt);
0110
0111 Message_Msg& operator<<(const int theInt) { return Arg(theInt); }
0112
0113
0114 Standard_EXPORT Message_Msg& Arg(const double theReal);
0115
0116 Message_Msg& operator<<(const double theReal) { return Arg(theReal); }
0117
0118
0119 const TCollection_ExtendedString& Original() const;
0120
0121
0122
0123 const TCollection_ExtendedString& Value() const;
0124
0125
0126 bool IsEdited() const;
0127
0128
0129
0130
0131
0132 Standard_EXPORT const TCollection_ExtendedString& Get();
0133
0134 operator const TCollection_ExtendedString&() { return Get(); }
0135
0136 private:
0137 Standard_EXPORT int getFormat(const int theType, TCollection_AsciiString& theFormat);
0138
0139 Standard_EXPORT void replaceText(const int theFirst,
0140 const int theNb,
0141 const TCollection_ExtendedString& theStr);
0142
0143 TCollection_ExtendedString myOriginal;
0144 TCollection_ExtendedString myMessageBody;
0145 NCollection_Sequence<int> mySeqOfFormats;
0146 };
0147
0148 #include <Message_Msg.lxx>
0149
0150 #endif