Main MRPT website > C++ reference for MRPT 1.9.9
CMemoryChunk_impl.cpp
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 /** \file While refactoring mrpt-base into smaller sublibraries, CMemoryChunk
11  was found to be problematic: it inherited from very low-level classes in both
12  mrpt-io and mrpt-serialization. To keep those two libraries independent of
13  each other, I propose to IMPLEMENT its RTTI stuff here, in mrpt-opengl, as a
14  dirty workaround, while it is DECLARED in mrpt-serialization using CRTP.
15 */
16 
17 #include "opengl-precomp.h" // Precompiled header
18 
19 #include <mrpt/io/CMemoryStream.h>
21 
22 // IMPLEMENTS_SERIALIZABLE(CMemoryChunk, CSerializable, mrpt::serialization)
23 template <class Derived>
26 {
27  return static_cast<mrpt::rtti::CObject*>(
29 }
30 template <class Derived>
33 {
35 }
36 template <class Derived>
39 {
41 }
42 template <class Derived>
45  "CMemoryChunk",
47  &CMemoryChunk::_GetBaseClass};
48 template <class Derived>
51 {
53 }
54 template <class Derived>
58 template <class Derived>
60  const
61 {
62  return static_cast<mrpt::rtti::CObject*>(
64 }
65 
66 // Explicit instantiation
mrpt::serialization::CMemoryChunkBase::GetRuntimeClass
virtual const mrpt::rtti::TRuntimeClassId * GetRuntimeClass() const override
Definition: CMemoryChunk_impl.cpp:50
mrpt::serialization::CMemoryChunkBase::_init_CMemoryChunk
static mrpt::rtti::CLASSINIT _init_CMemoryChunk
Definition: CMemoryChunk.h:35
mrpt::rtti::TRuntimeClassId
A structure that holds runtime class type information.
Definition: CObject.h:30
mrpt::serialization::CMemoryChunkBase::clone
virtual mrpt::rtti::CObject * clone() const override
Definition: CMemoryChunk_impl.cpp:59
mrpt::serialization::CMemoryChunkBase::CreateObject
static mrpt::rtti::CObject * CreateObject()
Definition: CMemoryChunk_impl.cpp:25
CMemoryStream.h
mrpt::serialization::CMemoryChunkBase::GetRuntimeClassIdStatic
static const mrpt::rtti::TRuntimeClassId & GetRuntimeClassIdStatic()
Definition: CMemoryChunk_impl.cpp:38
mrpt::serialization::CMemoryChunkBase::_GetBaseClass
static const mrpt::rtti::TRuntimeClassId * _GetBaseClass()
Definition: CMemoryChunk_impl.cpp:32
mrpt::rtti::CObject
The virtual base class of all MRPT classes with a unified RTTI system.
Definition: CObject.h:142
CLASS_ID_NAMESPACE
#define CLASS_ID_NAMESPACE(class_name, namespaceName)
Definition: CObject.h:88
mrpt::serialization::CSerializable
The virtual base class which provides a unified interface for all persistent objects in MRPT.
Definition: CSerializable.h:32
mrpt::serialization
Definition: aligned_serialization.h:14
opengl-precomp.h
mrpt::rtti::CLASSINIT
Auxiliary structure used for CObject-based RTTI.
Definition: CObject.h:113
mrpt::serialization::CMemoryChunkBase
A memory buffer (implements CStream) which can be itself serialized.
Definition: CMemoryChunk.h:23
CMemoryChunk.h



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST