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
STY_Subject.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: STY_Subject.h ( STY Library, C++)
7
*
8
* COMMENTS:
9
*/
10
11
#ifndef __STY_Subject__
12
#define __STY_Subject__
13
14
#include "
STY_API.h
"
15
#include "
STY_Types.h
"
16
#include "
STY_BindingDataSource.h
"
17
#include <
UT/UT_IntrusivePtr.h
>
18
19
class
STY_TargetMatchStatus
;
20
21
/// Describes the entity subjected to stylilng, ie, entity whose properties can
22
/// be overriden by style sheets (eg, a specific primitive in the whole scene,
23
/// whose material diffuse color is being overriden from blue to red).
24
/// Subjects matching a given target may be asked to provide pre binding
25
/// data associated with the target.
26
/// Also, subject may optionally provide additional style sheet, which contains
27
/// overrides that are intended to itself (self-targeted entries) or that are
28
/// intended for subject's children (non self-target entries), if subjects
29
/// are structured hierarchically (eg, in the case of packed primitives).
30
class
STY_API
STY_Subject
:
31
public
UT_IntrusiveRefCounter
<STY_Subject>
32
{
33
public
:
34
virtual
~STY_Subject
()
35
{ }
36
37
/// Returns the information wheter the subject matches the given target.
38
virtual
STY_TargetMatchStatus
39
matchesStyleTarget(
const
STY_TargetHandle
&
target
)
const
= 0;
40
41
/// Returns a source object that can provide data for the given data name.
42
/// Eg, style subject representing a primitive can provide primitive
43
/// attribute data.
44
virtual
STY_BindingDataSourceHandle
45
getOverrideBindingDataSource(
46
const
UT_StringHolder
&data_name)
const
;
47
48
/// Returns the style sheet that should be applied
49
/// to this subject. This style sheet is applied _before_ this subject
50
/// is used to filter out non-matching styles. This subject is the top
51
/// level target for these styles.
52
/// Returns an empty string, if no style sheet is provided.
53
virtual
STY_StyleSheetHandle
54
getPreFilterStyleSheet()
const
;
55
56
/// Returns the style sheet that should be applied
57
/// to this subject and its children. This style sheet is applied _after_
58
/// this subject is used to filter out non-matching styles. The children
59
/// of this subject are the top level targets for these styles.
60
/// Returns an empty string, if no style sheet is provided.
61
virtual
STY_StyleSheetHandle
62
getPostFilterStyleSheet()
const
;
63
64
/// Returns the location where the above subject-specific style sheet
65
/// comes from. For example the name of the object, prim number, etc.
66
/// Returns a default value of "Unknown Subject Source".
67
virtual
UT_StringHolder
68
getSourceLocation()
const
;
69
70
protected
:
71
/// Helper for handling path requirement.
72
STY_TargetMatchStatus
73
matchesPathHelper(
const
UT_StringRef
&
path
,
74
const
STY_TargetHandle
&
target
,
75
char
separator)
const
;
76
};
77
78
#endif
79
STY_API.h
path
GLsizei const GLchar *const * path
Definition:
glcorearb.h:3341
STY_Subject
Definition:
STY_Subject.h:30
STY_TargetMatchStatus
Contains information about the style subject match to the style target.
Definition:
STY_TargetMatchStatus.h:19
UT_StringRef
Definition:
UT_StringHolder.h:188
STY_API
#define STY_API
Definition:
STY_API.h:10
UT_IntrusiveRefCounter
A reference counter base class for use with UT_IntrusivePtr.
Definition:
UT_IntrusivePtr.h:242
UT_StringHolder
Definition:
UT_StringHolder.h:999
UT_IntrusivePtr< const STY_Target >
target
GLenum target
Definition:
glcorearb.h:1667
STY_Subject::~STY_Subject
virtual ~STY_Subject()
Definition:
STY_Subject.h:34
STY_BindingDataSource.h
STY_Types.h
UT_IntrusivePtr.h
STY
STY_Subject.h
Generated on Fri Nov 8 2024 03:41:39 for HDK by
1.8.6