BuiltinDataType.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2014 by Ralf Kaestner *
3  * ralf.kaestner@gmail.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the Lesser GNU General Public License as published by*
7  * the Free Software Foundation; either version 3 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * Lesser GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the Lesser GNU General Public License *
16  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17  ******************************************************************************/
18 
20 
21 namespace variant_topic_tools {
22 
23 /*****************************************************************************/
24 /* Constructors and Destructor */
25 /*****************************************************************************/
26 
28 }
29 
31  DataType(src) {
32 }
33 
35  DataType(src) {
36  if (impl)
37  BOOST_ASSERT(boost::dynamic_pointer_cast<Impl>(*impl));
38 }
39 
41 }
42 
43 BuiltinDataType::Impl::Impl(const std::string& identifier) :
44  identifier(identifier) {
45 }
46 
48 }
49 
50 /*****************************************************************************/
51 /* Accessors */
52 /*****************************************************************************/
53 
55  if (impl)
56  return boost::dynamic_pointer_cast<Impl>(*impl)->isNumeric();
57  else
58  return false;
59 }
60 
61 const std::string& BuiltinDataType::Impl::getIdentifier() const {
62  return identifier;
63 }
64 
65 /*****************************************************************************/
66 /* Operators */
67 /*****************************************************************************/
68 
71 
72  if (impl)
73  BOOST_ASSERT(boost::dynamic_pointer_cast<BuiltinDataType::Impl>(*impl));
74 
75  return *this;
76 }
77 
78 }
BuiltinDataType & operator=(const DataType &src)
Assignment operator.
Built-in data type implementation.
ImplPtr impl
The data type&#39;s implementation adapter.
Definition: DataType.h:226
bool isNumeric() const
True, if this built-in data type is numeric.
virtual DataType & operator=(const DataType &src)
Assignment operator.
Definition: DataType.cpp:179
const std::string & getIdentifier() const
Retrieve the identifier representing this data type (implementation)
BuiltinDataType()
Default constructor.
virtual bool isNumeric() const =0
True, if this built-in data type is numeric (abstract declaration)
Header file providing the BuiltinDataType class interface.
std::string identifier
The identifier representing this built-in data type.


variant_topic_tools
Author(s): Ralf Kaestner
autogenerated on Sat Jan 9 2021 03:56:49