vfs: check userland buffers before reading them.
[haiku.git] / headers / private / debugger / ids / FunctionID.h
blobee5d81cb9976ea9a632a75ccbe4909d1a9d55e86
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef FUNCTION_ID_H
6 #define FUNCTION_ID_H
9 #include <Archivable.h>
10 #include <String.h>
12 #include "ObjectID.h"
15 class FunctionID : public ObjectID, public BArchivable {
16 protected:
17 FunctionID(const BMessage& archive);
18 FunctionID(const BString& path,
19 const BString& functionName);
21 public:
22 virtual ~FunctionID();
24 virtual status_t Archive(BMessage* archive,
25 bool deep = true) const;
27 const BString& FunctionName() const { return fFunctionName; }
29 protected:
30 virtual uint32 ComputeHashValue() const;
32 bool IsValid() const;
34 protected:
35 BString fPath;
36 BString fFunctionName;
40 class SourceFunctionID : public FunctionID {
41 public:
42 SourceFunctionID(const BMessage& archive);
43 SourceFunctionID(const BString& sourceFilePath,
44 const BString& functionName);
45 virtual ~SourceFunctionID();
47 static BArchivable* Instantiate(BMessage* archive);
49 const BString& SourceFilePath() const { return fPath; }
51 virtual bool operator==(const ObjectID& other) const;
55 class ImageFunctionID : public FunctionID {
56 public:
57 ImageFunctionID(const BMessage& archive);
58 ImageFunctionID(const BString& imageName,
59 const BString& functionName);
60 virtual ~ImageFunctionID();
62 static BArchivable* Instantiate(BMessage* archive);
64 const BString& ImageName() const { return fPath; }
66 virtual bool operator==(const ObjectID& other) const;
70 #endif // FUNCTION_ID_H