AGX Dynamics
2.37.3.2
ScriptConsole.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2024. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, are copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or having been
9
advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10
valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx Simulation AB.
15
*/
16
17
18
#pragma once
19
#ifndef AGXPYTHON_SCRIPTCONSOLE_H
20
#define AGXPYTHON_SCRIPTCONSOLE_H 1
21
22
#include <agx/config/AGX_USE_PYTHON.h>
23
24
#if AGX_USE_PYTHON()
25
26
#include <
agxPython/export.h
>
27
28
#include <
agx/Referenced.h
>
29
#include <
agx/String.h
>
30
31
#include <string>
32
33
namespace
agxPython
34
{
35
36
class
AGXPYTHON_EXPORT
ScriptConsole :
public
agx::Referenced
37
{
38
public
:
39
46
static
bool
EmbedIntoPython();
47
48
ScriptConsole();
49
55
virtual
void
OnStdout(
const
agx::String
& buffer);
56
62
virtual
void
OnStderr(
const
agx::String
& buffer);
63
64
void
write
(
const
std::string& s,
void
*type);
65
66
void
init
();
67
68
void
set_stdout();
69
void
reset_stdout();
70
71
void
set_stderr();
72
void
reset_stderr();
73
74
protected
:
75
76
virtual
~ScriptConsole();
77
78
private
:
79
80
void
*m_stdout;
81
void
*m_stdout_saved;
82
83
void
*m_stderr;
84
void
*m_stderr_saved;
85
86
};
87
88
89
}
90
91
92
93
#endif
94
95
#endif
agx::init
void AGXPHYSICS_EXPORT init()
Initialize AGX Dynamics API including thread resources and must be executed before using the AGX API...
agx::AgXString
Definition:
String.h:31
export.h
agx::Referenced
Base class providing referencing counted objects.
Definition:
Referenced.h:119
Referenced.h
agxStream::write
bool AGXPHYSICS_EXPORT write(const std::string &filename, const agxStream::Serializable *data)
Write a Serializable object to a file.
agxPython
Definition:
QtAgxWrapper.h:58
AGXPYTHON_EXPORT
#define AGXPYTHON_EXPORT
Definition:
agxPython/export.h:41
String.h
include
agxPython
ScriptConsole.h
Generated on Fri Apr 12 2024 12:40:26 for AGX Dynamics by
1.8.13