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
PRM_TemplateBuilder.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
* NAME: PRM_TemplateBuilder.h (Parameter Library)
7
*
8
* COMMENTS:
9
* Constructs a PRM_Template * list from an embedded .ds file.
10
*
11
*/
12
13
#ifndef __PRM_TemplateBuilder__
14
#define __PRM_TemplateBuilder__
15
16
#include "
PRM_API.h
"
17
#include "
PRM_Type.h
"
18
#include <
UT/UT_NonCopyable.h
>
19
#include <
UT/UT_StringHolder.h
>
20
21
class
PRM_Template
;
22
class
PRM_ScriptPage
;
23
class
DS_Stream
;
24
class
UT_IStream
;
25
26
/// Constructs a PRM_Template list from an embedded .ds file or an istream.
27
class
PRM_API
PRM_TemplateBuilder
28
{
29
public
:
30
/// extra_parms is the number of additional parameter templates at the
31
/// head of templates(). That is, the first parameter from the .ds file is
32
/// loaded into templates()[extra_parms].
33
PRM_TemplateBuilder
(
const
UT_StringHolder
&
name
,
const
char
*dstext,
34
const
char
**cpp_options =
nullptr
,
35
int
extra_parms = 0);
36
PRM_TemplateBuilder
(
const
UT_StringHolder
&name,
UT_IStream
&
stream
,
37
const
char
**cpp_options =
nullptr
,
38
int
extra_parms = 0);
39
~
PRM_TemplateBuilder
();
40
41
UT_NON_COPYABLE
(
PRM_TemplateBuilder
)
42
43
PRM_Template
*templates()
const
{
return
myTemplate; }
44
45
int
templateLength
()
const
{
return
myTemplateLength; }
46
47
void
setCallback(
const
UT_StringRef
&
name
,
48
PRM_Callback
callback);
49
void
setChoiceListPtr(
const
UT_StringRef
&
name
,
50
PRM_ChoiceList
*list);
51
52
void
setNoResim(
const
UT_StringRef
&
name
,
bool
noresim);
53
void
setNoCook(
const
UT_StringRef
&
name
,
bool
nocook);
54
55
/// Returns if it was just built, used for any successive one
56
/// time initialization. Calling this function will mark it as
57
/// built.
58
bool
justBuilt();
59
60
/// Returns a template pointer by name. Searches nested multiparms.
61
PRM_Template
*findTemplate(
const
UT_StringRef
&
name
);
62
63
private
:
64
65
void
load(
UT_IStream
&
stream
,
const
char
**cpp_options,
66
int
extra_parms);
67
68
PRM_Template
*myTemplate;
69
int
myTemplateLength;
70
PRM_ScriptPage
*myPage;
71
bool
myJustBuilt;
72
UT_StringHolder
myName;
73
};
74
75
#endif
stream
GLuint GLuint stream
Definition:
glcorearb.h:1832
PRM_Type.h
UT_IStream
Definition:
UT_IStream.h:56
UT_StringRef
Definition:
UT_StringHolder.h:198
PRM_Template
Definition:
PRM_Template.h:49
PRM_Callback
Definition:
PRM_Callback.h:33
PRM_ScriptPage
Definition:
PRM_ScriptPage.h:30
UT_StringHolder
Definition:
UT_StringHolder.h:1009
PRM_TemplateBuilder::templateLength
int templateLength() const
Definition:
PRM_TemplateBuilder.h:45
PRM_TemplateBuilder
Constructs a PRM_Template list from an embedded .ds file or an istream.
Definition:
PRM_TemplateBuilder.h:27
UT_NON_COPYABLE
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
Definition:
UT_NonCopyable.h:31
PRM_API.h
name
GLuint const GLchar * name
Definition:
glcorearb.h:786
PRM_ChoiceList
Definition:
PRM_ChoiceList.h:77
UT_NonCopyable.h
UT_StringHolder.h
DS_Stream
Definition:
DS_Stream.h:25
PRM_API
#define PRM_API
Definition:
PRM_API.h:10
PRM
PRM_TemplateBuilder.h
Generated on Wed Aug 27 2025 03:07:14 for HDK by
1.8.6