DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
Object.cpp
Go to the documentation of this file.
1#include "pch.h"
2#include "System/Object.h"
3
4namespace DotNetDupe {
5 namespace System {
6 bool Object::operator==(const Object& obj) const {
8 return this == &obj;
9 }
10
11 bool Object::Equals(const Object& obj) const {
13 return *this == obj;
14 }
15
16 bool Object::Equals(const Object& obj1, const Object& obj2) {
18 return obj1 == obj2;
19 }
20
21 int Object::GetHashCode() const {
23 return 0;
24 }
25
26 wchar_t* Object::ToStringW() const {
28 return nullptr;
29 }
30
31 char* Object::ToStringA() const {
33 return nullptr;
34 }
35 }
36}
37
38namespace DotNetDupe::System {
41 return ::operator new(size);
42 }
43
46 ::operator delete(p);
47 }
48}
49
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition Common.h:20
Base object class for DotNetDupe mirroring .NET System.Object.
Supports all classes in the DotNetDupe class hierarchy.
Definition Object.h:18
virtual bool Equals(const Object &obj) const
Determines whether the specified Object is equal to the current Object.
Definition Object.cpp:11
char * ToStringA() const
Returns narrow-character string representation.
Definition Object.cpp:31
bool operator==(const Object &obj) const
Determines reference equality between two objects.
Definition Object.cpp:6
wchar_t * ToStringW() const
Returns wide-character string representation.
Definition Object.cpp:26
virtual int GetHashCode() const
Serves as the default hash function.
Definition Object.cpp:21
void * AllocateCollectionBuffer(size_t size)
Internal memory allocator for generic collections.
Definition Object.cpp:39
void FreeCollectionBuffer(void *p)
Frees collection buffer allocated with AllocateCollectionBuffer.
Definition Object.cpp:44