Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

vos/metaobjects/misc/hypercard.hh

Go to the documentation of this file.
00001 /* $Id: hypercard.hh,v 1.12 2003/07/24 05:18:21 tetron Exp $ */
00002 
00003 
00004 /* This file was generated by otd2cpp.pl, a script for VOS by Reed Hedges <reed@zerohour.net>. 
00005 
00006    Search for TODO for stuff that needs editing. You will want to especially fill in constructors,
00007    destructors, message handlers, non-property subobjects...
00008 
00009    I can make no garuntee that this code will work, or even that it even is safe to run.
00010    Use it at your own risk.
00011 */
00012 
00013 /** @file hypercard.hh Defines MetaObject class for Hypercard type (revision 0).
00014 
00015 */ 
00016 
00017 #ifndef _HYPERCARD_HH_
00018 #define _HYPERCARD_HH_
00019 
00020 #include <vos/corelibs/vos/vos.hh>
00021 #include <vos/metaobjects/property/property.hh>
00022 
00023 #if defined(_WIN32) && defined(_MSC_VER)
00024 # ifdef MISC_EXPORTS
00025 #  define MISC_API __declspec(dllexport)
00026 # else
00027 #  define MISC_API __declspec(dllimport)
00028 # endif
00029 #else
00030 # define MISC_API
00031 #endif
00032 
00033 /** MetaObject implementing Hypercard Object Type. 
00034     
00035         An object bearing this type suggests to the application that it may load the 
00036         child object named "link" as a new document or enterable space for the user.
00037     
00038 */
00039 
00040 class MISC_API Hypercard : public virtual MetaObject
00041 {
00042 
00043 public:
00044 
00045     /** Constructor */
00046     Hypercard(MetaObject* superobject);
00047 
00048 
00049     /** Return type string ("hypercard") */
00050     const string getType();
00051 
00052     /** Register Extenders */
00053     static void registerExtenders();
00054 
00055 
00056     /** @name Access Subobjects */
00057     //@{
00058 
00059     /** Get link (
00060             This child may link to any object, but is recommended to link to the top level of
00061             a document or space, or a property containing data for display.         
00062         ). */
00063     Vobject& getLink();
00064 
00065     /** @deprecated use getLink. */
00066     Vobject& get_link() { return getLink(); }
00067 
00068     /** Set link.
00069         @param newobj   The new subobject. */
00070     void setLink(Vobject* newobj);
00071 
00072     /// @deprecated use setLink. */
00073     void set_link(Vobject* newobj) { setLink(newobj); }
00074 
00075     /** Get description */
00076     string getDescription();
00077 
00078     /// @deprecated use getDescription
00079     string get_description() { return getDescription(); }
00080 
00081     /** Set description
00082      * @param description   The new description
00083      * @param type           New description's data type. Default is text/plain.
00084      * @param accesscontrol  Property access control policy. Default is policy set
00085      * with initialize().
00086      */
00087     void setDescription(const string& description, const string& type = "text/plain", PropertyAccessControl* accesscontrol = NULL);
00088 
00089     /// @deprecated use setDescription
00090     void set_description(const string& description, const string& type = "text/plain", PropertyAccessControl* accesscontrol = NULL) {
00091         setDescription(description, type, accesscontrol);
00092     }
00093 
00094     /** Get title */
00095     string getTitle();
00096 
00097     /// @deprecated use getTitle
00098     string get_title() { return getTitle(); }
00099 
00100     /** Set title 
00101      * @param title The new title 
00102      * @param type  The title's type. Default is text/plain. 
00103      * @param ac    Property access control. Default is policty set with
00104      * initialize().
00105      */
00106 
00107     void setTitle(const string& title, const string& type = "text/plain", PropertyAccessControl* ac = NULL); 
00108 
00109     /// @deprecated use setTitle.
00110     void set_title(const string& title, const string& type = "text/plain", PropertyAccessControl* ac = NULL) {
00111         setTitle(title, type, ac);
00112     }
00113 
00114     //@}
00115     
00116     
00117 
00118     /** initialize. set's property access control to NOPropertyAccessControl. */
00119     virtual void initialize();
00120 
00121     /** initialize, with given access control as the default for new
00122      * subproperties. */
00123     virtual void initialize(PropertyAccessControl* ac);
00124 
00125 private:
00126 
00127     PropertyAccessControl* defaultPropertyAC;
00128 
00129 
00130 };
00131 
00132 
00133 
00134 /** Local version of Hypercard. */
00135 
00136 class MISC_API LocalHypercard : public virtual Hypercard
00137 {
00138 public:
00139 
00140     /** Constructor */
00141     LocalHypercard(MetaObject* superobject);
00142 
00143     /** Initialize subproperties and access control. */
00144     virtual void initialize();
00145 
00146     /** Static generator, for factory. */
00147     static MetaObject* new_LocalHypercard(MetaObject* superobject, const string& type);
00148 
00149     /** Called when this object gets a message */
00150     virtual void sendMessage(Message* m);
00151 
00152 
00153     /** initialize subproperties and access control, with given access control as the default for new
00154      * subproperties. */
00155     virtual void initialize(PropertyAccessControl* ac);
00156 
00157 };
00158 
00159 
00160 /** Remote version of Hypercard. */
00161 
00162 class MISC_API RemoteHypercard : public virtual Hypercard
00163 {
00164 
00165 public:
00166 
00167     /** Constructor */
00168     RemoteHypercard(MetaObject* superobject);
00169 
00170     /** Static generator, for factory. */
00171     static MetaObject* new_RemoteHypercard(MetaObject* superobject, const string& type);
00172 
00173     /** Called when this object gets an update message from its Local master across the network. */
00174     void sendUpdateMessage(Message *m);
00175 
00176 };
00177 
00178 
00179 #endif // #ifdef _HYPERCARD_HH_
00180 

Generated on Tue Aug 12 03:55:44 2003 for Interreality Project - VOS by doxygen 1.3.2