cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
svlWebObjectBase.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5 
6  Author(s): Balazs Vagvolgyi
7  Created on: 2009-11-04
8 
9  (C) Copyright 2005-2009 Johns Hopkins University (JHU), All Rights
10  Reserved.
11 
12  --- begin cisst license - do not edit ---
13 
14  This software is provided "as is" under an open source license, with
15  no warranty. The complete license can be found in license.txt and
16  http://www.cisst.org/cisst/license.txt.
17 
18  --- end cisst license ---
19 
20 */
21 
22 
23 #ifndef _svlWebObjectBase_h
24 #define _svlWebObjectBase_h
25 
26 #include <cisstCommon.h>
29 
30 #include <string>
31 
32 // Always the last cisst include
33 #include <cisstCommon/cmnExport.h>
34 
35 
37 {
39 
40 friend class svlWebPublisher;
41 
42 public:
43  svlWebObjectBase(const std::string & name);
44  virtual ~svlWebObjectBase();
45  virtual svlWebObjectBase* clone() const = 0;
46 
47  virtual void Read(char*& data, int& datasize);
48  virtual void Write(char* data, int datasize);
49  virtual void Lock();
50  virtual void Unlock();
51  const std::string & GetName();
52  const std::string & GetContentType();
53  bool IsReadable();
54  bool IsWritable();
55  bool IsTemporary();
56 
57 protected:
58  bool Readable;
59  bool Writable;
60 
61  void SetContentType(const std::string & content_type);
62 
63 private:
65 
67  std::string Name;
68  std::string ContentType;
69  bool Temporary;
70 };
71 
73 
74 #endif // _svlWebObjectBase_h
75 
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
Definition: osaCriticalSection.h:36
Definition: svlWebObjectBase.h:36
Base class for high level objects.
Definition: cmnGenericObject.h:51
Macros to export the symbols of cisstCommon (in a Dll).
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
Definition: svlWebPublisher.h:40
bool Readable
Definition: svlWebObjectBase.h:58
bool Writable
Definition: svlWebObjectBase.h:59
const int CMN_NO_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:328
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition: cmnClassRegisterMacros.h:202
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76