mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-08 18:40:55 +03:00
"endl" manipulator for Message_Messenger is renamed to "Message_EndLine". The following entities from std namespace are now used with std:: explicitly specified (from Standard_Stream.hxx): std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream, std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr, std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision, std::hex,std::dec.
86 lines
2.7 KiB
C++
86 lines
2.7 KiB
C++
// Created on: 2000-01-31
|
|
// Created by: data exchange team
|
|
// Copyright (c) 2000-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_ListOfMsg.hxx>
|
|
#include <Message_Msg.hxx>
|
|
#include <ShapeExtend_MsgRegistrator.hxx>
|
|
#include <Standard_Transient.hxx>
|
|
#include <Standard_Type.hxx>
|
|
#include <TopoDS_Shape.hxx>
|
|
|
|
IMPLEMENT_STANDARD_RTTIEXT(ShapeExtend_MsgRegistrator,ShapeExtend_BasicMsgRegistrator)
|
|
|
|
//=======================================================================
|
|
//function : ShapeExtend_MsgRegistrator
|
|
//purpose :
|
|
//=======================================================================
|
|
ShapeExtend_MsgRegistrator::ShapeExtend_MsgRegistrator() : ShapeExtend_BasicMsgRegistrator()
|
|
{
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : Send
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void ShapeExtend_MsgRegistrator::Send(const Handle(Standard_Transient)& object,
|
|
const Message_Msg& message,
|
|
const Message_Gravity)
|
|
{
|
|
if (object.IsNull()) {
|
|
#ifdef OCCT_DEBUG
|
|
std::cout << "Warning: ShapeExtend_MsgRegistrator::Send: null object" << std::endl;
|
|
#endif
|
|
return;
|
|
}
|
|
if (myMapTransient.IsBound (object)) {
|
|
Message_ListOfMsg& list = myMapTransient.ChangeFind (object);
|
|
list.Append (message);
|
|
}
|
|
else {
|
|
Message_ListOfMsg list;
|
|
list.Append (message);
|
|
myMapTransient.Bind (object, list);
|
|
}
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : Send
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void ShapeExtend_MsgRegistrator::Send(const TopoDS_Shape& shape,
|
|
const Message_Msg& message,
|
|
const Message_Gravity)
|
|
{
|
|
if (shape.IsNull()) {
|
|
#ifdef OCCT_DEBUG
|
|
std::cout << "Warning: ShapeExtend_MsgRegistrator::Send: null shape" << std::endl;
|
|
#endif
|
|
return;
|
|
}
|
|
if (myMapShape.IsBound (shape)) {
|
|
Message_ListOfMsg& list = myMapShape.ChangeFind (shape);
|
|
list.Append (message);
|
|
}
|
|
else {
|
|
Message_ListOfMsg list;
|
|
list.Append (message);
|
|
myMapShape.Bind (shape, list);
|
|
}
|
|
}
|
|
|