A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Object.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* *
3
* Copyright 2018 Rice University *
4
* *
5
* Licensed under the Apache License, Version 2.0 (the "License"); *
6
* you may not use this file except in compliance with the License. *
7
* You may obtain a copy of the License at *
8
* *
9
* http://www.apache.org/licenses/LICENSE-2.0 *
10
* *
11
* Unless required by applicable law or agreed to in writing, software *
12
* distributed under the License is distributed on an "AS IS" BASIS, *
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14
* See the License for the specific language governing permissions and *
15
* limitations under the License. *
16
* *
17
*****************************************************************************/
18
19
#ifndef OBJECT_H
20
#define OBJECT_H
21
22
#include <cstddef>
23
#include <iostream>
24
#include <vector>
25
#include <algorithm>
26
#include <iterator>
27
#include <cstring>
28
29
#include "
TypeName.h
"
30
#include "
DeepCopy.h
"
31
32
namespace
pdb {
33
34
enum
ObjectPolicy
{
defaultObject
,
noReferenceCountObject
};
35
36
37
// This is the basic PDB Object type. Everything that is stored in PDB should
38
// derive from this. Currently, it simply overrides all of the new () operators
39
// so that it is basically impossible to create an object via new (). Additional
40
// v-table fixing code will be added in the near future.
41
//
42
class
Object
{
43
44
public
:
45
// these all just error out since they should never be called
46
static
void
*
operator
new
(
size_t
sz,
const
std::nothrow_t& tag);
47
static
void
*
operator
new
(
size_t
sz);
48
static
void
operator
delete
(
void
* me);
49
static
void
*
operator
new
(std::size_t count,
void
* ptr);
50
void
setVTablePtr
(
void
* setToMe);
51
void
*
getVTablePtr
();
52
53
// these are properly defined via the ENABLE_DEEP_COPY macro
54
virtual
void
setUpAndCopyFrom
(
void
* target,
void
* source)
const
;
55
virtual
void
deleteObject
(
void
* deleteMe);
56
virtual
size_t
getSize
(
void
* ofMe);
57
};
58
}
59
60
#include "
Object.cc
"
61
62
#endif
pdb::Object
Definition:
Object.h:42
pdb::ObjectPolicy
ObjectPolicy
Definition:
Object.h:34
TypeName.h
pdb::Object::setUpAndCopyFrom
virtual void setUpAndCopyFrom(void *target, void *source) const
Definition:
Object.cc:74
pdb::Object::getSize
virtual size_t getSize(void *ofMe)
Definition:
Object.cc:90
pdb::Object::setVTablePtr
void setVTablePtr(void *setToMe)
Definition:
Object.cc:57
DeepCopy.h
pdb::Object::getVTablePtr
void * getVTablePtr()
Definition:
Object.cc:69
pdb::Object::deleteObject
virtual void deleteObject(void *deleteMe)
Definition:
Object.cc:82
pdb::noReferenceCountObject
Definition:
Object.h:34
pdb::defaultObject
Definition:
Object.h:34
Object.cc
plinycompute
pdb
src
objectModel
headers
Object.h
Generated on Mon Jun 18 2018 18:10:36 by
1.8.6