From 89a3b6133ade1ccb3a8e9ab9c86eac6aaef5db69 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 15 Nov 2010 17:46:28 +0200 Subject: Add support for custom object pointers New option: --default-pointer. New object pragma specifier: pointer. --- odb/options.cli | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'odb/options.cli') 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 = "*" + { + "", + "Use 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}. 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{} 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 { "", -- cgit v1.1