- Main Page
- Classes
- Files

- Search for |

# RemoteSFTime.h

Go to the documentation of this file.

    00001 /*****************************
    00002 File:      RemoteSFTime.h
    00003 Language:   C++ (header)
    00004 Project:    H3DNetworkingUtils
    00005 The contents of this file are subject to the Mozilla Public License
    00006 Version 1.1 (the "License"); you may not use this file except in
    00007 compliance with the License. You may obtain a copy of the License at
    00008 http://www.mozilla.org/MPL/
    00009
    00010 Software distributed under the License is distributed on an "AS IS"
    00011 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
    00012 License for the specific language governing rights and limitations
    00013 under the License.
    00014
    00015 The Original Code is H3DNetworkingUtils v1.0.
    00016
    00017 The Initial Developer of the Original Code is CSIRO.
    00018 Portions created by the Initial Developer are Copyright (C) 1009 CSIRO. All Rights Reserved.
    00019 Contributor(s):
    00020     Chris Gunn  <Chris.Gunn@csiro.au> <ChrisJGunn@gmail.com>
    00021 ***************************/
    00022
    00025
    00026 #ifndef RemoteSFTime_H
    00027 #define RemoteSFTime_H
    00028
    00029 // The RemoteSFTime class provides a  remote Time field.  It inherits most of its funtionality from its parent
    00030 // class.
    00031 // This class adds a VRML interface and the details of how to read and write
    00032 // the field data.
    00033 //
    00034 // Fields:
    00035 // <INPUT_ONLY  "toBeSent" "SFTime" ""  >
    00036 // <OUTPUT_ONLY "received"   "SFTime" "0" >
    00037 //
    00038 #include "H3DNetworkingUtils/RemoteSF.h"
    00039 #include <H3D/SFTime.h>
    00040
    00041 namespace H3DNetworkingUtils {
    00042
    00058
    00059 class H3D_NETWORKING_UTILS_DLL_SPEC RemoteSFTime : public RemoteSF<H3D::SFDouble> {
    00060
    00061 public:
    00062
    00063    struct SFTimeTransfer : public H3D::TypedField<H3D::SFTime, void, H3D::SField<H3DDouble> >  {
    00064      virtual void update();
    00065    };
    00066
    00068    RemoteSFTime(H3D::Inst<H3D::SFTime> _sent_t = 0,
    00069                  H3D::Inst<SFTimeTransfer> _received_t = 0);
    00070
    00072    static H3D::H3DNodeDatabase database;
    00073
    00078   auto_ptr< H3D::SFTime> send_t;
    00079
    00084   auto_ptr< SFTimeTransfer> received_t;
    00085
    00086 protected:
    00088   virtual void readValue();
    00089
    00091   virtual void writeValue(H3DUtil::H3DTime const & val) {writeDouble(val);}
    00092
    00093 };
    00094
    00095 }
    00096
    00097 #endif