HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_text.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 __HOM_text_h__
10 #define __HOM_text_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include <vector>
15 
16 SWIGOUT(%rename(text) HOM_text;)
17 
19 {
20 public:
21  virtual ~HOM_text()
22  { }
23 
24  virtual std::string __repr__() = 0;
25 
26  virtual std::string expandString(const char *str) = 0;
27  virtual std::string expandStringAtFrame(const char *str, double frame) = 0;
28  virtual std::string incrementNumberedString(const char *str) = 0;
29 
30  // Use Punycode-like scheme to encode and decode strings with special
31  // characters into a form that can be used as a variable, attribute, or
32  // parameter name.
33  virtual std::string encode(const char *varname) = 0;
34  virtual std::string decode(const char *varname) = 0;
35  virtual std::string encodeAttrib(const char *attribname) = 0;
36  virtual std::string decodeAttrib(const char *attribname) = 0;
37  virtual std::string encodeParm(const char *parmname) = 0;
38  virtual std::string decodeParm(const char *parmname) = 0;
39 
40  // Expose the UT_String forceAlphaNumeric method.
41  virtual std::string alphaNumeric(const char *str) = 0;
42 
43  // Convert paths from relative to absolute, or vice versa.
44  SWIGOUT(%kwargs abspath;)
45  virtual std::string abspath(const char *path,
46  const char *anchor_path = nullptr) = 0;
47  SWIGOUT(%kwargs relpath;)
48  virtual std::string relpath(const char *path,
49  const char *anchor_path = nullptr) = 0;
50  virtual std::string normpath(const char *path) = 0;
51 
52  // Collapse a file path if it starts with the expanded form of one of our
53  // standard env vars (HIP, JOB).
54  SWIGOUT(%kwargs collapseCommonVars;)
55  virtual std::string collapseCommonVars(const char *path,
56  const std::vector<std::string> &vars =
57  std::vector<std::string>()) = 0;
58 
59  virtual std::string patternRename(const char *str, const char* find, const char* replace) = 0;
60  SWIGOUT(%kwargs patternMatch;)
61  virtual bool patternMatch(const char *pattern, const char* str, bool ignore_case=false, bool path_match=false) = 0;
62 };
63 
64 #endif
OIIO_API bool rename(string_view from, string_view to, std::string &err)
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:353
#define HOM_API
Definition: HOM_API.h:13
std::string OIIO_API replace(string_view str, string_view pattern, string_view replacement, bool global=false)
FMT_CONSTEXPR bool find(Ptr first, Ptr last, T value, Ptr &out)
Definition: format.h:2929
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
GLubyte * pattern
Definition: glew.h:5741
virtual ~HOM_text()
Definition: HOM_text.h:21