Re: [ C++API ] ostream ?
| Date : Thu, 29 Sep 2005 11:21:22 +0200 |
| To : XSI(at)Softimage.COM |
| From : Daniel Collin <emoon(at)home.se> |
| Subject : Re: [ C++API ] ostream ? |
Its really simple to implement and that way I can redirect all my logging to for example the XSI logwindow.
Im not very familiar with how iostream works but maybe you can implement somthing like
std::xsiout << "using standard iostream here" << std::endl;
You should check out what kind of class cout/cerr is and it might be possible to inharit that class
and write the output to the logconsole instead.
Hope this helps.
Daniel
OK, I see. I guess I stick with good ol' LogMessage and XSI's CString then.
Luc-Eric Rousseau wrote:
we're re-directing stdin/out/err in XSI,
however this will work for plug-ins only
if you use the multi-treaded DLL version of the VC++ dotNet 2003 run-time library, in Release mode. In other words the same version that XSI is using.
This is because the C Run-time library
is not using the operating system's handle
but rather each do their own private setup.
It also can't work from a shader because
the std handlers are local to each thread.
------------------ Luc-Eric Rousseau Team Leader, User Interface Softimage|XSI
-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Felix Gebhardt
Posted At: Wednesday, September 28, 2005 9:36 AM
Posted To: xsi
Conversation: [ C++API ] ostream ?
Subject: Re: [ C++API ] ostream ?
From a plugin or an operator it doesn't work here. I even tried all wide specialisations.
F.
Halfdan Ingvarsson wrote:
I believe we also capture everything written to stdout
and/or stderr. For example, this *should* work:
cout << "monkey\n";
mental ray has a special capture system that pipes directly
into the history log after some massaging.
I don't know if this has changed recently. YMMV.
- 1/2
________________________________
From: owner-xsi(at)Softimage.COM on behalf of Felix Gebhardt Sent: Wed 28-Sep-05 09:03 To: XSI(at)Softimage.COM Subject: Re: [ C++API ] ostream ?
Hi Aloys,
Yes, I have such utility inlines. It's actually even called
Log() :) I
was just a bit tired of carrying it around for a second and
was hoping
I'm missing something obvious as I had that Python print()
in the back
of my head. I guess Jacko is right and someone put that up specially for Python and Mental Ray but not for the C++ API,
Thanks anyway, F.
Aloys Baillet wrote:
Hi,
Actually you can shorten things a little bit:
Application app; app.LogMessage(L"huhu");
will work.
And you can also make a macro for that:
#define log(x) Application().LogMessage(x) #define errx) Application().LogMessage(x, siErrorMsg)
log(L"huhu") err(L"Bad!")
Hope this helps!
Aloys
On 28/09/05, Felix Gebhardt <gebhardt(at)betacarotin.de> wrote:
Hi,
Is there a way to directly write to the History Window's stream? I mean something more direct than Application().LogMessage(CString(L"huhu"));
Maybe my memory is playing tricks on me but I think
--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi
- Follow-Ups:
- Re: [ C++API ] ostream ?
- From: Felix Gebhardt <gebhardt(at)betacarotin.de>
- Re: [ C++API ] ostream ?
- References:
- RE: [ C++API ] ostream ?
- From: "Luc-Eric Rousseau" <lucer(at)Softimage.COM>
- Re: [ C++API ] ostream ?
- From: Felix Gebhardt <gebhardt(at)betacarotin.de>
- RE: [ C++API ] ostream ?
| DATE: | << | >> | THREAD: | << | >> | INDEX: | Main | Thread |
|---|
- Previous by Date: [ C++ API ] Display Callbacks - How to query the view's display mode
- Next by Date: [ C++ API ] Display Callbacks - How to query the view's display mode
- Previous by Thread: [ C++ API ] Display Callbacks - How to query the view's display mode
- Next by Thread: [ C++ API ] Display Callbacks - How to query the view's display mode
- Index(es):
| Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available. |