HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CMD_Alias.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: CMD library (C++)
7  *
8  * COMMENTS: Alias handling for CMD library
9  *
10  */
11 
12 #ifndef __CMD_Alias_H__
13 #define __CMD_Alias_H__
14 
15 #include "CMD_API.h"
16 #include "CMD_SymbolList.h"
17 #include <iosfwd>
18 
19 class CMD_Alias;
20 
22 {
23 public:
25  virtual ~CMD_AliasTable();
26 
27  bool hasAlias(const char *name)
28  {
29  return hasValue(name);
30  }
31  bool getAlias(const char *name, UT_String &value)
32  {
33  return getValue(name, value);
34  }
35  void setAlias(const char *name, const char *value)
36  {
37  setValue(name, value, /*export_var=*/false);
38  }
39  bool destroyAlias(const char *name)
40  {
41  return destroySymbol(name);
42  }
44  {
45  return getSymbolNames(nameList);
46  }
47 
48 private:
49  bool isValidSymbolName(const char *name) const override;
50 
51  void save(CMD_Manager *cman, std::ostream &os);
52  friend class CMD_Manager; // For save
53 };
54 
55 #endif
bool getValue(const char *name, UT_String &value)
bool getAlias(const char *name, UT_String &value)
Definition: CMD_Alias.h:31
int64 exint
Definition: SYS_Types.h:109
bool setValue(const char *name, const char *value, bool export_var)
exint getAliasNames(UT_StringArray &nameList)
Definition: CMD_Alias.h:43
GLuint const GLchar * name
Definition: glcorearb.h:785
void setAlias(const char *name, const char *value)
Definition: CMD_Alias.h:35
GLsizei const GLfloat * value
Definition: glcorearb.h:823
#define CMD_API
Definition: CMD_API.h:10
bool destroyAlias(const char *name)
Definition: CMD_Alias.h:39
virtual bool isValidSymbolName(const char *name) const
virtual bool destroySymbol(const char *name)
exint getSymbolNames(UT_StringArray &nameList)
bool hasValue(const char *name) const
bool hasAlias(const char *name)
Definition: CMD_Alias.h:27