ICG 2
Electric Boogaloo
StringDataType.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stddef.h>
4 #include <string>
5 #include <stdexcept>
6 
7 #include "Type/DataType.hpp"
8 
9 
12 class StringDataType : public DataType {
13 
14  public:
15 
19  StringDataType( ) ;
20 
21  /* ================================================================================= */
22  /* RULE OF THREE (and a half) INTERFACE */
23  /* ================================================================================= */
24 
25  StringDataType ( const StringDataType & original ) = delete;
26  ~StringDataType () = default;
27  StringDataType& operator=( const StringDataType & rhs ) = delete;
28 
29  /* ==================================================================== */
30  /* VIRTUAL INTERFACE */
31  /* ==================================================================== */
32 
39  bool validate(DataTypeInator * dataTypeInator = NULL) override;
40 
41  bool isValid() const override;
42 
43 
47  size_t getSize() const override;
48 
49 
53  void* createInstance(unsigned int num) const override;
54 
57  void deleteInstance(void* address) const override;
58 
59  std::string getTypeSpecName () const override;
60 
61 
62  bool accept (DataTypeVisitor* visitor) const override;
63 
64 
65  private:
66 };
67 
Register and manage datatypes at runtime.
Definition: DataTypeInator.hpp:16
Abstract base class for a DataTypeVisitor.
Definition: DataTypeVisitor.hpp:20
Abstract base class for DataTypes.
Definition: DataType.hpp:11
Definition: StringDataType.hpp:12
size_t getSize() const override
Definition: StringDataType.cpp:22
StringDataType & operator=(const StringDataType &rhs)=delete
bool validate(DataTypeInator *dataTypeInator=NULL) override
A StringDataType is always valid.
Definition: StringDataType.cpp:14
bool isValid() const override
Determine whether this type has already been successfully validated.
Definition: StringDataType.cpp:18
bool accept(DataTypeVisitor *visitor) const override
Definition: StringDataType.cpp:40
std::string getTypeSpecName() const override
Get the Type Spec Name object.
Definition: StringDataType.cpp:36
~StringDataType()=default
StringDataType()
Definition: StringDataType.cpp:8
void * createInstance(unsigned int num) const override
Definition: StringDataType.cpp:26
void deleteInstance(void *address) const override
Delete this instance.
Definition: StringDataType.cpp:31
StringDataType(const StringDataType &original)=delete