diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-11-15 17:46:28 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-11-15 17:46:28 +0200 |
commit | 89a3b6133ade1ccb3a8e9ab9c86eac6aaef5db69 (patch) | |
tree | 394eb90c5acc9b55460bc7e4961cf791a60e397d /odb/options.cli | |
parent | 61acf05c698a8b611c5ccf6aed8d3e654d5acf8e (diff) |
Add support for custom object pointers
New option: --default-pointer. New object pragma specifier: pointer.
Diffstat (limited to 'odb/options.cli')
-rw-r--r-- | odb/options.cli | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/odb/options.cli b/odb/options.cli index 8c9a965..ad8b97b 100644 --- a/odb/options.cli +++ b/odb/options.cli @@ -65,6 +65,29 @@ class options lost." }; + std::string --default-pointer = "*" + { + "<ptr>", + "Use <ptr> as the default pointer for persistent objects. Objects that + do not have a pointer assigned with the \cb{pointer} pragma specifier + will use this pointer by default. The value of this option can be \cb{*} + which denotes a 'naked' pointer and is the default, or a qualified name + of a smart pointer class template, for example, \cb{std::auto_ptr}. In + the latter case, the ODB compiler constructs the object pointer by adding + a single template argument of the object type to the qualified name, for + example \cb{std::auto_ptr<object>}. The object pointer is used by the + ODB runtime to return dynamically allocated instances of the object + type. + + Except for the 'naked' pointer and the standard smart pointers defined + in the \cb{<memory>} header file, you are expected to include the + definition of the default pointer at the beginning of the generated + header file. There are two common ways to achieve this: you can either + include the necessary header in the file being compiled or you can use + the \cb{--hxx-prologue} option to add the necessary \cb{#include} + directive to the generated code." + }; + std::string --output-dir | -o { "<dir>", |