cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
svlSample.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 _svlSample_h
23 #define _svlSample_h
24 
26 
27 // Always include last!
29 
30 
32 {
33 public:
34  svlSample();
35  svlSample(const svlSample & other);
36  svlSample & operator= (const svlSample & other);
37 
38  virtual ~svlSample();
39  virtual svlSample* GetNewInstance() const = 0;
40  virtual svlStreamType GetType() const = 0;
41  virtual int SetSize(const svlSample* sample) = 0;
42  virtual int SetSize(const svlSample& sample) = 0;
43  virtual int CopyOf(const svlSample* sample) = 0;
44  virtual int CopyOf(const svlSample& sample) = 0;
45  virtual bool IsInitialized() const;
46  virtual unsigned char* GetUCharPointer() = 0;
47  virtual const unsigned char* GetUCharPointer() const = 0;
48  virtual unsigned int GetDataSize() const = 0;
49  virtual void SerializeRaw(std::ostream & outputStream) const = 0;
50  virtual void DeSerializeRaw(std::istream & inputStream) = 0;
51 
52 public:
53  void SetTimestamp(double ts);
54  double GetTimestamp() const;
55  static svlSample* GetNewFromType(svlStreamType type);
56  void SetEncoder(const std::string & codec, const int parameter);
57  void GetEncoder(std::string & codec, int & parameter) const;
58 
59 private:
60  double Timestamp; // [seconds]
61  std::string Encoder;
62  int EncoderParameter;
63 };
64 
65 #endif // _svlSample_h
66 
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
svlStreamType
Definition: svlDefinitions.h:193
virtual void SerializeRaw(std::ostream &outputStream) const
virtual void DeSerializeRaw(std::istream &inputStream)
Base class for data object in cisstMultiTask.
Definition: mtsGenericObject.h:56
Macros to export the symbols of cisstStereoVision (in a Dll).
Definition: svlSample.h:31