mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
144 lines
4.5 KiB
Plaintext
144 lines
4.5 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 :
|
|
//=======================================================================
|
|
|
|
#include <TCollection_HAsciiString.hxx>
|
|
#include <TCollection_HExtendedString.hxx>
|
|
|
|
// 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)
|
|
{
|
|
theMessenger->Send (theStream.str().c_str(), Message_Info, Standard_False);
|
|
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;
|
|
}
|