HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PDG_Command.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* COMMENTS:
7
*/
8
9
#ifndef __PDG_COMMAND_H__
10
#define __PDG_COMMAND_H__
11
12
#include "
PDG_API.h
"
13
14
#include <
UT/UT_NonCopyable.h
>
15
#include <
UT/UT_StringHolder.h
>
16
#include <
UT/UT_WorkBuffer.h
>
17
18
#include <time.h>
19
20
class
PDG_GraphContext
;
21
22
enum
PDG_CommandType
23
{
24
PDG_COMMAND_CHUNK
,
25
PDG_USER_COMMAND
,
26
PDG_RUNTIME_COMMAND
27
};
28
29
class
PDG_API
PDG_Command
30
{
31
public
:
32
PDG_Command
();
33
virtual
~
PDG_Command
();
34
UT_NON_COPYABLE
(
PDG_Command
)
35
36
bool
hasDoneIt()
const
;
37
bool
hasFailed()
const
;
38
bool
result
()
const
{
return
!hasFailed(); }
39
40
bool
doIt(
PDG_GraphContext
* context);
41
bool
undoIt(
PDG_GraphContext
* context);
42
virtual
bool
doIt(
PDG_GraphContext
* context,
UT_WorkBuffer
& errors);
43
virtual
bool
undoIt(
PDG_GraphContext
* context,
UT_WorkBuffer
& errors);
44
virtual
bool
canDoIt();
45
virtual
bool
canUndoIt();
46
virtual
PDG_CommandType
commandType() = 0;
47
virtual
PDG_CommandType
baseCommandType();
48
virtual
void
description(
UT_WorkBuffer
&
buffer
,
int
depth
=0);
49
virtual
void
fullDescription(
UT_WorkBuffer
&
buffer
);
50
51
UT_StringHolder
timeAsString()
const
;
52
time_t
creationTime
()
const
{
return
myTime; }
53
54
protected
:
55
virtual
bool
doCommand(
PDG_GraphContext
*,
UT_WorkBuffer
&) = 0;
56
virtual
bool
undoCommand(
PDG_GraphContext
*,
UT_WorkBuffer
&) = 0;
57
58
private
:
59
bool
myHasDoneIt;
60
bool
myHasFailed;
61
time_t myTime;
62
};
63
64
#endif
/* __PDG_COMMAND_H__ */
UT_WorkBuffer
Definition:
UT_WorkBuffer.h:74
PDG_CommandType
PDG_CommandType
Definition:
PDG_Command.h:22
PDG_API
#define PDG_API
Definition:
PDG_API.h:23
PDG_Command::result
bool result() const
Definition:
PDG_Command.h:38
PDG_Command::creationTime
time_t creationTime() const
Definition:
PDG_Command.h:52
PDG_RUNTIME_COMMAND
Definition:
PDG_Command.h:26
UT_StringHolder
Definition:
UT_StringHolder.h:999
buffer
Definition:
core.h:760
UT_WorkBuffer.h
UT_NON_COPYABLE
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
Definition:
UT_NonCopyable.h:31
UT_NonCopyable.h
depth
GLint GLint GLsizei GLsizei GLsizei depth
Definition:
glcorearb.h:476
PDG_API.h
UT_StringHolder.h
PDG_Command
Definition:
PDG_Command.h:29
PDG_GraphContext
Definition:
PDG_GraphContext.h:61
PDG_USER_COMMAND
Definition:
PDG_Command.h:25
PDG_COMMAND_CHUNK
Definition:
PDG_Command.h:24
PDG
PDG_Command.h
Generated on Sat Dec 21 2024 02:47:28 for HDK by
1.8.6