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 "
PDG_Types.h
"
15
16
#include <
UT/UT_NonCopyable.h
>
17
#include <
UT/UT_StringHolder.h
>
18
#include <
UT/UT_WorkBuffer.h
>
19
20
#include <time.h>
21
22
class
PDG_GraphContext
;
23
24
class
PDG_API
PDG_Command
25
{
26
public
:
27
PDG_Command
();
28
virtual
~
PDG_Command
();
29
UT_NON_COPYABLE
(
PDG_Command
)
30
31
bool
hasDoneIt()
const
;
32
bool
hasFailed()
const
;
33
bool
result
()
const
{
return
!hasFailed(); }
34
35
bool
doIt(
PDG_GraphContext
* context);
36
bool
undoIt(
PDG_GraphContext
* context);
37
virtual
bool
doIt(
PDG_GraphContext
* context,
UT_WorkBuffer
& errors);
38
virtual
bool
undoIt(
PDG_GraphContext
* context,
UT_WorkBuffer
& errors);
39
virtual
bool
canDoIt();
40
virtual
bool
canUndoIt();
41
virtual
PDG_CommandType
commandType() = 0;
42
virtual
PDG_CommandType
baseCommandType();
43
virtual
void
description(
UT_WorkBuffer
&
buffer
,
int
depth
=0);
44
virtual
void
fullDescription(
UT_WorkBuffer
&
buffer
);
45
46
UT_StringHolder
timeAsString()
const
;
47
time_t
creationTime
()
const
{
return
myTime; }
48
49
protected
:
50
virtual
bool
doCommand(
PDG_GraphContext
*,
UT_WorkBuffer
&) = 0;
51
virtual
bool
undoCommand(
PDG_GraphContext
*,
UT_WorkBuffer
&) = 0;
52
53
private
:
54
bool
myHasDoneIt;
55
bool
myHasFailed;
56
time_t myTime;
57
};
58
59
#endif
/* __PDG_COMMAND_H__ */
PDG_CommandType
PDG_CommandType
Definition:
PDG_Types.h:542
UT_WorkBuffer
Definition:
UT_WorkBuffer.h:73
PDG_API
#define PDG_API
Definition:
PDG_API.h:23
PDG_Command::result
bool result() const
Definition:
PDG_Command.h:33
PDG_Types.h
PDG_Command::creationTime
time_t creationTime() const
Definition:
PDG_Command.h:47
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:24
PDG_GraphContext
Definition:
PDG_GraphContext.h:59
PDG
PDG_Command.h
Generated on Thu May 9 2024 03:15:31 for HDK by
1.8.6