LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
FsaAccessIOHandler.h
Go to the documentation of this file.
1// Copyright 2002-2013 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6/***************************************************************************
7 FsaAccessIOHandler.h - description
8 -------------------
9 begin : aout 31 2005
10 copyright : CEA 2003
11 email : olivier.mesnard@cea.fr
12 ***************************************************************************/
13#ifndef FSA_IO_HANDLER_HPP
14#define FSA_IO_HANDLER_HPP
15
16#include <boost/serialization/strong_typedef.hpp>
18
19namespace Lima {
20namespace Common {
21namespace FsaAccess {
22
23BOOST_STRONG_TYPEDEF(uint64_t, VERT_ID);
24
25template <typename graphType >
27public:
29 void readEdgeAsInt( AbstractFsaAccessIStreamWrapper& iw, VERT_ID& source, VERT_ID& target );
31 VERTEX_PROPERTY_16& propVal, Lima::LimaString& text );
32 void writeEdgeAsInt( AbstractFsaAccessOStreamWrapper& ow, VERT_ID source, VERT_ID target );
34 VERTEX_PROPERTY_16 propVal, const Lima::LimaString& text );
35
36 virtual bool isInMap( typename boost::graph_traits<graphType>::vertex_descriptor from );
38 typename boost::graph_traits<graphType>::vertex_descriptor& source,
39 typename boost::graph_traits<graphType>::vertex_descriptor& target ) = 0;
41 typename boost::graph_traits<graphType>::vertex_descriptor& current,
42 VERTEX_PROPERTY_16& propVal, Lima::LimaString& text ) = 0;
44 typename boost::graph_traits<graphType>::vertex_descriptor source,
45 typename boost::graph_traits<graphType>::vertex_descriptor target ) = 0;
47 typename boost::graph_traits<graphType>::vertex_descriptor current,
48 VERTEX_PROPERTY_16 propVal,
49 const Lima::LimaString& text ) = 0;
50protected:
51 // map where to store conversion of node identifier
52 // (from pointer to int) (used in write() )
53 std::map<typename boost::graph_traits<graphType>::vertex_descriptor,
55 // vector where to store conversion of node identifier
56 // (from int to pointer) (used in read??() )
57 std::vector<typename boost::graph_traits<graphType>::vertex_descriptor> m_index2PtrVectorPtr ;
58};
59
60template <typename graphType >
62 public:
65 typename boost::graph_traits<graphType>::vertex_descriptor& source,
66 typename boost::graph_traits<graphType>::vertex_descriptor& target ) override;
68 typename boost::graph_traits<graphType>::vertex_descriptor& current,
69 VERTEX_PROPERTY_16& propVal, Lima::LimaString& text ) override;
71 typename boost::graph_traits<graphType>::vertex_descriptor source,
72 typename boost::graph_traits<graphType>::vertex_descriptor target ) override;
74 typename boost::graph_traits<graphType>::vertex_descriptor current,
75 VERTEX_PROPERTY_16 propVal,
76 const Lima::LimaString& text ) override;
77
78 private:
79};
80
81template <typename graphType >
83 public:
86 typename boost::graph_traits<graphType>::vertex_descriptor& source,
87 typename boost::graph_traits<graphType>::vertex_descriptor& target ) override;
89 typename boost::graph_traits<graphType>::vertex_descriptor& current,
90 VERTEX_PROPERTY_16& propVal, Lima::LimaString& text ) override;
92 typename boost::graph_traits<graphType>::vertex_descriptor source,
93 typename boost::graph_traits<graphType>::vertex_descriptor target ) override;
95 typename boost::graph_traits<graphType>::vertex_descriptor current,
96 VERTEX_PROPERTY_16 propVal,
97 const Lima::LimaString& text ) override;
98
99 private:
100};
101
102} // namespace compactDict
103} // namespace Common
104} // namespace Lima
105
106#include "common/FsaAccess/FsaAccessIOHandler.tcc"
107
108#endif //FSA_IO_HANDLER_HPP
#define VERTEX_PROPERTY_16
void writeVertice(AbstractFsaAccessOStreamWrapper &ow, typename boost::graph_traits< graphType >::vertex_descriptor current, VERTEX_PROPERTY_16 propVal, const Lima::LimaString &text) override
void writeEdge(AbstractFsaAccessOStreamWrapper &ow, typename boost::graph_traits< graphType >::vertex_descriptor source, typename boost::graph_traits< graphType >::vertex_descriptor target) override
void readEdge(AbstractFsaAccessIStreamWrapper &iw, typename boost::graph_traits< graphType >::vertex_descriptor &source, typename boost::graph_traits< graphType >::vertex_descriptor &target) override
void readVertice(AbstractFsaAccessIStreamWrapper &iw, typename boost::graph_traits< graphType >::vertex_descriptor &current, VERTEX_PROPERTY_16 &propVal, Lima::LimaString &text) override
void readEdge(AbstractFsaAccessIStreamWrapper &iw, typename boost::graph_traits< graphType >::vertex_descriptor &source, typename boost::graph_traits< graphType >::vertex_descriptor &target) override
void writeEdge(AbstractFsaAccessOStreamWrapper &ow, typename boost::graph_traits< graphType >::vertex_descriptor source, typename boost::graph_traits< graphType >::vertex_descriptor target) override
void readVertice(AbstractFsaAccessIStreamWrapper &iw, typename boost::graph_traits< graphType >::vertex_descriptor &current, VERTEX_PROPERTY_16 &propVal, Lima::LimaString &text) override
void writeVertice(AbstractFsaAccessOStreamWrapper &ow, typename boost::graph_traits< graphType >::vertex_descriptor current, VERTEX_PROPERTY_16 propVal, const Lima::LimaString &text) override
virtual bool isInMap(typename boost::graph_traits< graphType >::vertex_descriptor from)
std::map< typename boost::graph_traits< graphType >::vertex_descriptor, VERT_ID > m_ptr2IndexMapPtr
virtual void readVertice(AbstractFsaAccessIStreamWrapper &iw, typename boost::graph_traits< graphType >::vertex_descriptor &current, VERTEX_PROPERTY_16 &propVal, Lima::LimaString &text)=0
void readEdgeAsInt(AbstractFsaAccessIStreamWrapper &iw, VERT_ID &source, VERT_ID &target)
std::vector< typename boost::graph_traits< graphType >::vertex_descriptor > m_index2PtrVectorPtr
virtual void readEdge(AbstractFsaAccessIStreamWrapper &iw, typename boost::graph_traits< graphType >::vertex_descriptor &source, typename boost::graph_traits< graphType >::vertex_descriptor &target)=0
void readVerticeAsInt(AbstractFsaAccessIStreamWrapper &iw, VERT_ID &current, VERTEX_PROPERTY_16 &propVal, Lima::LimaString &text)
virtual void writeEdge(AbstractFsaAccessOStreamWrapper &ow, typename boost::graph_traits< graphType >::vertex_descriptor source, typename boost::graph_traits< graphType >::vertex_descriptor target)=0
void writeEdgeAsInt(AbstractFsaAccessOStreamWrapper &ow, VERT_ID source, VERT_ID target)
virtual void writeVertice(AbstractFsaAccessOStreamWrapper &ow, typename boost::graph_traits< graphType >::vertex_descriptor current, VERTEX_PROPERTY_16 propVal, const Lima::LimaString &text)=0
void writeVerticeAsInt(AbstractFsaAccessOStreamWrapper &ow, VERT_ID current, VERTEX_PROPERTY_16 propVal, const Lima::LimaString &text)
BOOST_STRONG_TYPEDEF(uint64_t, VERT_ID)
NAUTITIA.
QString LimaString
Definition LimaString.h:33