blob: 97e019644e0bbf1be6ff663269a795ad51fa1442 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
// -*- C++ -*-
// $Id$
//=============================================================================
/**
* @file SANetFileIn.h
*
* This file contains the SANetFileIn class definition for the input adapter
* that initializes a SANet object using an XML SANet file.
*
* @author John S. Kinnebrew <john.s.kinnebrew@vanderbilt.edu>
*/
//=============================================================================
#ifndef SANET_SANET_FILE_IN_H_
#define SANET_SANET_FILE_IN_H_
#include "SANet_Types.h"
#include "SANet.h"
#if !defined (SANET_STANDALONE)
#include "Builder.h"
#endif
namespace SANet {
/**
* @class SANetFileIn
*
* @brief Input adapter that initializes a SANet object using an XML
* SANet file.
*/
class SANetFileIn {
public:
/// Constructor.
SANetFileIn (void);
/// Destructor.
virtual ~SANetFileIn (void);
/// Buffer size for string conversion.
const static size_t STR_BUF_SIZE = 129;
/// Create network from XML file.
/**
* @param filename Name of XML SANet network file.
*
* @return New SANet network.
*/
virtual Network *build_net (std::string filename);
#if !defined (SANET_STANDALONE)
/// Build network from XML file.
/**
* @param filename Name of XML SANet network file.
*
* @param builder SA-POP builder to use in building the SANet network.
*/
virtual void build_net (std::string filename, SA_POP::Builder *builder);
#endif /* SANET_STANDALONE not defined */
};
}; /* SANet namespace */
#endif /* SANET_SANET_FILE_IN_H_ */
|