Kernel: Updated several member functions to be const
This commit is contained in:
parent
bac6ca233c
commit
d472743ec6
5 changed files with 13 additions and 13 deletions
|
@ -15,8 +15,8 @@ namespace Kernel {
|
||||||
|
|
||||||
class Event : public Object {
|
class Event : public Object {
|
||||||
public:
|
public:
|
||||||
const char* GetTypeName() { return "Event"; }
|
const char* GetTypeName() const { return "Event"; }
|
||||||
const char* GetName() { return name.c_str(); }
|
const char* GetName() const { return name.c_str(); }
|
||||||
|
|
||||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Event; }
|
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Event; }
|
||||||
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Event; }
|
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Event; }
|
||||||
|
|
|
@ -44,8 +44,8 @@ class Object : NonCopyable {
|
||||||
public:
|
public:
|
||||||
virtual ~Object() {}
|
virtual ~Object() {}
|
||||||
Handle GetHandle() const { return handle; }
|
Handle GetHandle() const { return handle; }
|
||||||
virtual const char* GetTypeName() { return "[BAD KERNEL OBJECT TYPE]"; }
|
virtual const char* GetTypeName() const { return "[BAD KERNEL OBJECT TYPE]"; }
|
||||||
virtual const char* GetName() { return "[UNKNOWN KERNEL OBJECT]"; }
|
virtual const char* GetName() const { return "[UNKNOWN KERNEL OBJECT]"; }
|
||||||
virtual Kernel::HandleType GetHandleType() const = 0;
|
virtual Kernel::HandleType GetHandleType() const = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,8 +15,8 @@ namespace Kernel {
|
||||||
|
|
||||||
class Mutex : public Object {
|
class Mutex : public Object {
|
||||||
public:
|
public:
|
||||||
const char* GetTypeName() { return "Mutex"; }
|
const char* GetTypeName() const { return "Mutex"; }
|
||||||
const char* GetName() { return name.c_str(); }
|
const char* GetName() const { return name.c_str(); }
|
||||||
|
|
||||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Mutex; }
|
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Mutex; }
|
||||||
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Mutex; }
|
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Mutex; }
|
||||||
|
|
|
@ -24,8 +24,8 @@ namespace Kernel {
|
||||||
class Thread : public Kernel::Object {
|
class Thread : public Kernel::Object {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
const char* GetName() { return name; }
|
const char* GetName() const { return name; }
|
||||||
const char* GetTypeName() { return "Thread"; }
|
const char* GetTypeName() const { return "Thread"; }
|
||||||
|
|
||||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Thread; }
|
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Thread; }
|
||||||
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Thread; }
|
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Thread; }
|
||||||
|
|
|
@ -39,8 +39,8 @@ class Interface : public Kernel::Object {
|
||||||
friend class Manager;
|
friend class Manager;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
const char *GetName() { return GetPortName(); }
|
const char *GetName() const { return GetPortName(); }
|
||||||
const char *GetTypeName() { return GetPortName(); }
|
const char *GetTypeName() const { return GetPortName(); }
|
||||||
|
|
||||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Service; }
|
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Service; }
|
||||||
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Service; }
|
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Service; }
|
||||||
|
|
Loading…
Reference in a new issue