HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  /// Returns the full path (including the path to this root data)
34  /// for the specified subdata.
35  void appendFullDataPath(const SIM_Data *subdata,
36  bool useobjectid,
37  UT_String &datapath) const;
38 
39  /// Forces the value of the passed in string to contain a value that
40  /// represents a valid root data name. Currently valid root data names
41  /// are the same as valid variable names.
42  static void forceValidRootDataName(UT_String &rootdataname);
43 
44 protected:
45  SIM_RootData(const SIM_DataFactory *factory);
46  virtual ~SIM_RootData();
47 
48  /// This function returns whether this data matches the string pattern.
49  /// This function must be overridden by subclasses.
50  virtual bool getMatchesStringSubclass(const char *pattern) const=0;
51  /// This function fills out the SIM_RootDataId structure with the
52  /// unique identifier information for this root data.
53  virtual void getRootDataIdSubclass(SIM_RootDataId &id) const=0;
54 
56 
57 private:
60 };
61 
62 #endif
63 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
#define DECLARE_CLASSNAME(DataClass, SuperClass)
Definition: SIM_DataUtils.h:20
#define SIM_API
Definition: SIM_API.h:10
UT_String myName
Definition: SIM_RootData.h:55