Browse Source

[2207] Better documentation for LoadAction

Michal 'vorner' Vaner 12 years ago
parent
commit
1ae2321d71
1 changed files with 8 additions and 3 deletions
  1. 8 3
      src/lib/datasrc/memory/load_action.h

+ 8 - 3
src/lib/datasrc/memory/load_action.h

@@ -28,9 +28,14 @@ class ZoneData;
 
 /// \brief Callback to load data into the memory
 ///
-/// This callback should create new ZoneData (allocated from the passed
-/// memory segment) and fill it with relevant loaded data. The caller
-/// of the callback takes ownership of the ZoneData.
+/// This is called from the ZoneWriter whenever there's need to load the
+/// zone data. The callback should allocate new ZoneData and fill it with
+/// the zone content. It is up to the callback to know where or how to
+/// load the data, or even the origin and class of the zone (it is assumed
+/// the callback will be some kind of functor).
+///
+/// All data should be allocated from the passed MemorySegment. The ownership
+/// is passed onto the caller.
 ///
 /// It must not return NULL.
 typedef boost::function<ZoneData*(util::MemorySegment&)> LoadAction;