Blender  V3.3
spreadsheet_column_values.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
5 #include "DNA_space_types.h"
6 
8 #include "BLI_string_ref.hh"
9 
10 namespace blender::ed::spreadsheet {
11 
12 struct CellDrawParams;
13 
15 
21  protected:
22  std::string name_;
23 
25 
26  public:
27  ColumnValues(std::string name, GVArray data) : name_(std::move(name)), data_(std::move(data))
28  {
29  /* The array should not be empty. */
31  }
32 
33  virtual ~ColumnValues() = default;
34 
36  {
38  }
39 
41  {
42  return name_;
43  }
44 
45  int size() const
46  {
47  return data_.size();
48  }
49 
50  const GVArray &data() const
51  {
52  return data_;
53  }
54 
55  /* The default width of newly created columns, in UI units. */
56  float default_width = 0.0f;
57 };
58 
59 } // namespace blender::ed::spreadsheet
#define BLI_assert(a)
Definition: BLI_assert.h:46
#define final(a, b, c)
Definition: BLI_hash.h:21
eSpreadsheetColumnValueType
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
const CPPType & type() const
eSpreadsheetColumnValueType type() const
ColumnValues(std::string name, GVArray data)
eSpreadsheetColumnValueType cpp_type_to_column_type(const CPPType &type)