privatize SkRefDict.h
authormike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Sun, 12 Aug 2012 23:45:04 +0000 (23:45 +0000)
committermike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Sun, 12 Aug 2012 23:45:04 +0000 (23:45 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@5049 2bbb7eff-a529-9590-31e7-b0007b416f81

gyp/core.gypi
include/core/SkRefDict.h [deleted file]
src/core/SkRefDict.h [new file with mode: 0644]

index fa03dd1f625d624ca5fa9376b491b7d6aac4c31c..e6cfc281f5eff88521c1ce21d7c39624b6ed39d8 100644 (file)
         '<(skia_include_path)/core/SkReader32.h',
         '<(skia_include_path)/core/SkRect.h',
         '<(skia_include_path)/core/SkRefCnt.h',
-        '<(skia_include_path)/core/SkRefDict.h',
         '<(skia_include_path)/core/SkRegion.h',
         '<(skia_include_path)/core/SkScalar.h',
         '<(skia_include_path)/core/SkScalarCompare.h',
diff --git a/include/core/SkRefDict.h b/include/core/SkRefDict.h
deleted file mode 100644 (file)
index 6751121..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-
-/*
- * Copyright 2011 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-
-#ifndef SkRefDict_DEFINED
-#define SkRefDict_DEFINED
-
-#include "SkRefCnt.h"
-
-/**
- *  A dictionary of string,refcnt pairs. The dictionary is also an owner of the
- *  refcnt objects while they are contained.
- */
-class SK_API SkRefDict : SkNoncopyable {
-public:
-    SkRefDict();
-    ~SkRefDict();
-
-    /**
-     *  Return the data associated with name[], or NULL if no matching entry
-     *  is found. The reference-count of the entry is not affected.
-     */
-    SkRefCnt* find(const char name[]) const;
-    
-    /**
-     *  If data is NULL, remove (if present) the entry matching name and call
-     *  prev_data->unref() on the data for the matching entry.
-     *  If data is not-NULL, replace the existing entry matching name and
-     *  call (prev_data->unref()), or add a new one. In either case,
-     *  data->ref() is called.
-     */
-    void set(const char name[], SkRefCnt* data);
-
-    /**
-     *  Remove the matching entry (if found) and unref its data.
-     */
-    void remove(const char name[]) { this->set(name, NULL); }
-
-    /**
-     *  Remove all entries, and unref() their associated data.
-     */
-    void removeAll();
-
-private:
-    struct Impl;
-    Impl* fImpl;
-};
-
-#endif
diff --git a/src/core/SkRefDict.h b/src/core/SkRefDict.h
new file mode 100644 (file)
index 0000000..6751121
--- /dev/null
@@ -0,0 +1,54 @@
+
+/*
+ * Copyright 2011 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+
+#ifndef SkRefDict_DEFINED
+#define SkRefDict_DEFINED
+
+#include "SkRefCnt.h"
+
+/**
+ *  A dictionary of string,refcnt pairs. The dictionary is also an owner of the
+ *  refcnt objects while they are contained.
+ */
+class SK_API SkRefDict : SkNoncopyable {
+public:
+    SkRefDict();
+    ~SkRefDict();
+
+    /**
+     *  Return the data associated with name[], or NULL if no matching entry
+     *  is found. The reference-count of the entry is not affected.
+     */
+    SkRefCnt* find(const char name[]) const;
+    
+    /**
+     *  If data is NULL, remove (if present) the entry matching name and call
+     *  prev_data->unref() on the data for the matching entry.
+     *  If data is not-NULL, replace the existing entry matching name and
+     *  call (prev_data->unref()), or add a new one. In either case,
+     *  data->ref() is called.
+     */
+    void set(const char name[], SkRefCnt* data);
+
+    /**
+     *  Remove the matching entry (if found) and unref its data.
+     */
+    void remove(const char name[]) { this->set(name, NULL); }
+
+    /**
+     *  Remove all entries, and unref() their associated data.
+     */
+    void removeAll();
+
+private:
+    struct Impl;
+    Impl* fImpl;
+};
+
+#endif