HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_RootData.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  */
7 
8 #ifndef __SIM_RootData_h__
9 #define __SIM_RootData_h__
10 
11 #include "SIM_API.h"
12 #include "SIM_DataUtils.h"
13 
14 class SIM_RootDataId;
15 
17 {
18 public:
19  /// Returns the name of the root data. The method for setting the name
20  /// is provided in the subclasses because the rules for when and how
21  /// this name can be set depends on the subclass type.
22  const UT_String &getName() const;
23 
24  /// Determines if this root data is a match for the pattern string
25  /// passed in. The string must be a single token, not a series of
26  /// tokens, but wildcards are allowed. This function just calls
27  /// getMatchesStringSubclass().
28  bool getMatchesString(const char *pattern) const;
29 
30  /// Fills out the root data identifier by calling getRootDataIdSubclass().
31  void getRootDataId(SIM_RootDataId &id) const;
32 
33 
34  /// Forces the value of the passed in string to contain a value that
35  /// represents a valid root data name. Currently valid root data names
36  /// are the same as valid variable names.
37  static void forceValidRootDataName(UT_String &rootdataname);
38 
39 protected:
40  SIM_RootData(const SIM_DataFactory *factory);
41  ~SIM_RootData() override;
42 
43  /// This function returns whether this data matches the string pattern.
44  /// This function must be overridden by subclasses.
45  virtual bool getMatchesStringSubclass(const char *pattern) const=0;
46  /// This function fills out the SIM_RootDataId structure with the
47  /// unique identifier information for this root data.
48  virtual void getRootDataIdSubclass(SIM_RootDataId &id) const=0;
49 
51 
52 private:
55 };
56 
57 #endif
58 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
#define DECLARE_CLASSNAME(DataClass, SuperClass)
Definition: SIM_DataUtils.h:20
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
GLushort pattern
Definition: glad.h:2583
#define SIM_API
Definition: SIM_API.h:12
UT_String myName
Definition: SIM_RootData.h:50