ColumnNameAlias.hpp
1 #ifndef OPALS_COLUMN_NAME_ALIAS_HPP_INCLUDED
2 #define OPALS_COLUMN_NAME_ALIAS_HPP_INCLUDED
3 
4 #pragma once
5 
6 #include "opals/config.hpp"
7 #include "opals/String.hpp"
8 
9 namespace opals {
10 
11  /// Class for defining column name aliases
12  class OPALS_API ColumnNameAlias
13  {
14  public:
16  /// Use definition string "<columnname>:<alias>" to initialize the object
17  ColumnNameAlias(const char *alias_defition);
18  ColumnNameAlias(const char *name, const char *alias);
19 
20  const char *name() const;
21  const char *alias() const;
22 
23  /// set object data using a definition string "<columnname>:<alias>"
24  void set(const char *alias_defition);
25 
26  protected:
27  String Name;
28  String Alias;
29  };
30 }
31 
32 #endif //OPALS_COLUMN_NAME_ALIAS_HPP_INCLUDED