// Created on: 2007-06-29 // Created by: OCC Team // Copyright (c) 2007-2012 OPEN CASCADE SAS // // The content of this file is subject to the Open CASCADE Technology Public // License Version 6.5 (the "License"). You may not use the content of this file // except in compliance with the License. Please obtain a copy of the License // at http://www.opencascade.org and read it completely before using this file. // // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. // // The Original Code and all software distributed under the License is // distributed on an "AS IS" basis, without warranty of any kind, and the // Initial Developer hereby disclaims all such warranties, including without // limitation, any warranties of merchantability, fitness for a particular // purpose or non-infringement. Please see the License for the specific terms // and conditions governing the rights and limitations under the License. #include //======================================================================= //function : GetPrinters //purpose : //======================================================================= inline const Message_SequenceOfPrinters& Message_Messenger::Printers() const { return myPrinters; } //======================================================================= //function : GetPrinters //purpose : //======================================================================= inline Message_SequenceOfPrinters& Message_Messenger::ChangePrinters() { return myPrinters; } //======================================================================= //function : operator << //purpose : //======================================================================= #ifndef _TCollection_HAsciiString_HeaderFile #include #endif #ifndef _TCollection_HExtendedString_HeaderFile #include #endif // CString inline const Handle(Message_Messenger)& operator << (const Handle(Message_Messenger)& theMessenger, const Standard_CString theStr) { theMessenger->Send (theStr, Message_Info, Standard_False); return theMessenger; } // const char* (not the same as const CString which is char const*) /* inline const Handle(Message_Messenger)& operator << (const Handle(Message_Messenger)& theMessenger, const char* theStr) { theMessenger->Send ((Standard_CString)theStr, Message_Info, Standard_False); return theMessenger; } */ // AsciiString inline const Handle(Message_Messenger)& operator << (const Handle(Message_Messenger)& theMessenger, const TCollection_AsciiString& theStr) { theMessenger->Send (theStr, Message_Info, Standard_False); return theMessenger; } // HAsciiString inline const Handle(Message_Messenger)& operator << (const Handle(Message_Messenger)& theMessenger, const Handle(TCollection_HAsciiString)& theStr) { theMessenger->Send (theStr->String(), Message_Info, Standard_False); return theMessenger; } // ExtendedString inline const Handle(Message_Messenger)& operator << (const Handle(Message_Messenger)& theMessenger, const TCollection_ExtendedString& theStr) { theMessenger->Send (theStr, Message_Info, Standard_False); return theMessenger; } // HExtendedString inline const Handle(Message_Messenger)& operator << (const Handle(Message_Messenger)& theMessenger, const Handle(TCollection_HExtendedString)& theStr) { theMessenger->Send (theStr->String(), Message_Info, Standard_False); return theMessenger; } // Integer inline const Handle(Message_Messenger)& operator << (const Handle(Message_Messenger)& theMessenger, const Standard_Integer theVal) { TCollection_AsciiString aStr (theVal); theMessenger->Send (aStr, Message_Info, Standard_False); return theMessenger; } // Real inline const Handle(Message_Messenger)& operator << (const Handle(Message_Messenger)& theMessenger, const Standard_Real theVal) { TCollection_AsciiString aStr (theVal); theMessenger->Send (aStr, Message_Info, Standard_False); return theMessenger; } // Stream inline const Handle(Message_Messenger)& operator << (const Handle(Message_Messenger)& theMessenger, const Standard_SStream& theStream) { #ifdef USE_STL_STREAM theMessenger->Send (theStream.str().c_str(), Message_Info, Standard_False); #else // Note: use dirty tricks -- unavoidable with old streams TCollection_AsciiString aStr (((Standard_SStream&)theStream).str(), theStream.pcount()); theMessenger->Send (aStr, Message_Info, Standard_False); ((Standard_SStream&)theStream).freeze (false); #endif return theMessenger; } // manipulators inline const Handle(Message_Messenger)& operator << (const Handle(Message_Messenger)& theMessenger, const Handle(Message_Messenger)& (*pman) (const Handle(Message_Messenger)&)) { return pman (theMessenger); } // endl inline const Handle(Message_Messenger)& endl (const Handle(Message_Messenger)& theMessenger) { theMessenger->Send ("", Message_Info, Standard_True); return theMessenger; }