From 024d774ccd986d46838ce5588a3ad9aedea424c0 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 28 Nov 2000 02:04:34 +0000 Subject: [PATCH] *** empty log message *** --- dtool/src/dconfig/notify.cxx | 13 +++++++++++++ dtool/src/dconfig/notify.h | 1 + 2 files changed, 14 insertions(+) diff --git a/dtool/src/dconfig/notify.cxx b/dtool/src/dconfig/notify.cxx index 1d349a9a9b..942baa01a4 100644 --- a/dtool/src/dconfig/notify.cxx +++ b/dtool/src/dconfig/notify.cxx @@ -332,6 +332,19 @@ null() { return *(ptr()->_null_ostream_ptr); } +//////////////////////////////////////////////////////////////////// +// Function: Notify::write_string +// Access: Public, Static +// Description: A convenient way for scripting languages, which may +// know nothing about ostreams, to write to Notify. +// This writes a single string, followed by an implicit +// newline, to the Notify output stream. +//////////////////////////////////////////////////////////////////// +void Notify:: +write_string(const string &str) { + out() << str << "\n"; +} + //////////////////////////////////////////////////////////////////// // Function: Notify::ptr // Access: Public, Static diff --git a/dtool/src/dconfig/notify.h b/dtool/src/dconfig/notify.h index ccfd9e1e3c..5147ea4c37 100644 --- a/dtool/src/dconfig/notify.h +++ b/dtool/src/dconfig/notify.h @@ -58,6 +58,7 @@ PUBLISHED: static ostream &out(); static ostream &null(); + static void write_string(const string &str); static Notify *ptr(); static long get_literal_flag();