cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
svlSampleText.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: 2010
8 
9  (C) Copyright 2006-2010 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 #ifndef _svlSampleText_h
23 #define _svlSampleText_h
24 
26 
27 // Always include last!
29 
30 
32 {
34 
35 public:
36  svlSampleText();
37  svlSampleText(const svlSampleText & other);
38  svlSampleText & operator= (const svlSampleText & other);
39 
40  svlSample* GetNewInstance() const;
41  svlStreamType GetType() const;
42  int SetSize(const svlSample* sample);
43  int SetSize(const svlSample& sample);
44  int CopyOf(const svlSample* sample);
45  int CopyOf(const svlSample& sample);
46  bool IsInitialized() const;
47  unsigned char* GetUCharPointer();
48  const unsigned char* GetUCharPointer() const;
49  unsigned int GetDataSize() const;
50  void SerializeRaw(std::ostream & outputStream) const;
51  void DeSerializeRaw(std::istream & inputStream);
52 
53  svlSampleText(const std::string & text);
54  void SetText(const std::string & text);
55  std::string & GetStringRef();
56  const std::string & GetStringRef() const;
57  char* GetCharPointer();
58  const char* GetCharPointer() const;
59  unsigned int GetSize() const;
60  unsigned int GetLength() const;
61 
62 protected:
63  std::string String;
64 };
65 
67 
68 #endif // _svlSampleText_h
69 
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
virtual svlSample * GetNewInstance() const =0
svlStreamType
Definition: svlDefinitions.h:193
#define CMN_DECLARE_SERVICES_INSTANTIATION_EXPORT(className)
Definition: cmnClassRegisterMacros.h:209
Definition: svlSampleText.h:31
virtual svlStreamType GetType() const =0
virtual int CopyOf(const svlSample *sample)=0
std::string String
Definition: svlSampleText.h:63
virtual unsigned char * GetUCharPointer()=0
virtual unsigned int GetDataSize() const =0
svlSample & operator=(const svlSample &other)
virtual void SerializeRaw(std::ostream &outputStream) const =0
virtual int SetSize(const svlSample *sample)=0
virtual void DeSerializeRaw(std::istream &inputStream)=0
Macros to export the symbols of cisstStereoVision (in a Dll).
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
virtual bool IsInitialized() const
const int CMN_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:331
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76
Definition: svlSample.h:31