mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
License statement text corrected; compiler warnings caused by Bison 2.41 disabled for MSVC; a few other compiler warnings on 54-bit Windows eliminated by appropriate type cast Wrong license statements corrected in several files. Copyright and license statements added in XSD and GLSL files. Copyright year updated in some files. Obsolete documentation files removed from DrawResources.
155 lines
4.9 KiB
Plaintext
155 lines
4.9 KiB
Plaintext
// Created on: 2007-06-29
|
|
// Created by: OCC Team
|
|
// Copyright (c) 2007-2014 OPEN CASCADE SAS
|
|
//
|
|
// This file is part of Open CASCADE Technology software library.
|
|
//
|
|
// This library is free software; you can redistribute it and/or modify it under
|
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
|
// by the Free Software Foundation, with special exception defined in the file
|
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
// distribution for complete text of the license and disclaimer of any warranty.
|
|
//
|
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
|
// commercial license or contractual agreement.
|
|
|
|
#include <Message_Messenger.hxx>
|
|
|
|
//=======================================================================
|
|
//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 <TCollection_HAsciiString.hxx>
|
|
#endif
|
|
#ifndef _TCollection_HExtendedString_HeaderFile
|
|
#include <TCollection_HExtendedString.hxx>
|
|
#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;
|
|
}
|