Loading...
Searching...
No Matches
serialization.h
1//
2// Copyright 2018 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7
8#ifndef PXR_BASE_TRACE_SERIALIZATION_H
9#define PXR_BASE_TRACE_SERIALIZATION_H
10
11#include "pxr/pxr.h"
12#include "pxr/base/trace/api.h"
13#include "pxr/base/trace/collection.h"
14
15#include <iosfwd>
16#include <memory>
17#include <vector>
18
19PXR_NAMESPACE_OPEN_SCOPE
20
27public:
30 TRACE_API static bool Write(std::ostream& ostr,
31 const std::shared_ptr<TraceCollection>& col);
32
35 TRACE_API static bool Write(
36 std::ostream& ostr,
37 const std::vector<std::shared_ptr<TraceCollection>>& collections);
38
43 TRACE_API static std::unique_ptr<TraceCollection> Read(std::istream& istr,
44 std::string* error = nullptr);
45};
46
47PXR_NAMESPACE_CLOSE_SCOPE
48
49#endif // PXR_BASE_TRACE_SERIALIZATION_H
This class contains methods to read and write TraceCollection.
Definition: serialization.h:26
static TRACE_API std::unique_ptr< TraceCollection > Read(std::istream &istr, std::string *error=nullptr)
Tries to create a TraceCollection from the contexts of istr.
static TRACE_API bool Write(std::ostream &ostr, const std::shared_ptr< TraceCollection > &col)
Writes col to ostr.
static TRACE_API bool Write(std::ostream &ostr, const std::vector< std::shared_ptr< TraceCollection > > &collections)
Writes collections to ostr.