![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <FileBucket.h>
Public Types | |
| enum class | Type : int { SUMO_CONFIG = 1 << 0 , NETEDIT_CONFIG = 1 << 1 , NETCONVERT_CONFIG = 1 << 2 , NETWORK = 1 << 3 , EDGETYPE = 1 << 4 , TLS = 1 << 5 , DEMAND = 1 << 6 , MEANDATA = 1 << 7 , ADDITIONAL = 1 << 8 , DATA = 1 << 9 , NETEDIT_PREFIX = 1 << 10 , SUMO_PREFIX = 1 << 11 , NETCONVERT_PREFIX = 1 << 12 , NOTHING = 1 << 13 } |
| Files that this bucket can save. More... | |
Public Member Functions | |
| FileBucket (FileBucket::Type type) | |
| Constructor for default bucket. | |
| FileBucket (FileBucket::Type type, const std::string filename) | |
| Constructor. | |
| const std::string & | getFilename () const |
| get filename | |
| FileBucket::Type | getType () const |
| get file type | |
| bool | isDefaultBucket () const |
| check if this is a default bucket | |
| void | setFilename (const std::string &filename) |
| set filename | |
| ~FileBucket () | |
| destructor | |
| void | addElement (const bool isTemplate) |
| function related with Elements | |
| void | removeElement (const bool isTemplate) |
| remove element | |
| int | getNumElements () const |
| check number of elements (no templates) | |
| bool | isEmpty () const |
| check if this bucket is empty | |
Static Public Attributes | |
| static const std::vector< FileBucket::Type > | prefixes |
| vector with all types and prefixes managed in this get bucket handler | |
| static const std::vector< FileBucket::Type > | types |
| vector with all types managed in this get bucket handler | |
Private Member Functions | |
| FileBucket ()=delete | |
| Invalidated default constructor. | |
| FileBucket (const FileBucket &)=delete | |
| Invalidated copy constructor. | |
| FileBucket & | operator= (const FileBucket &src)=delete |
| Invalidated assignment operator. | |
Private Attributes | |
| const bool | myDefaultBucket |
| flag to indicate if this is a default bucket (it cannot be removed) | |
| std::string | myFilename |
| filename | |
| const FileBucket::Type | myFileType |
| type | |
| int | myNumElements = 0 |
| number of elements vinculated with this file bucket | |
| int | myNumTemplates = 0 |
| number of templates vinculated with this file bucket | |
Definition at line 30 of file FileBucket.h.
|
strong |
Files that this bucket can save.
| Enumerator | |
|---|---|
| SUMO_CONFIG | |
| NETEDIT_CONFIG | |
| NETCONVERT_CONFIG | |
| NETWORK | |
| EDGETYPE | |
| TLS | |
| DEMAND | |
| MEANDATA | |
| ADDITIONAL | |
| DATA | |
| NETEDIT_PREFIX | |
| SUMO_PREFIX | |
| NETCONVERT_PREFIX | |
| NOTHING | |
Definition at line 34 of file FileBucket.h.
| FileBucket::FileBucket | ( | FileBucket::Type | type | ) |
Constructor for default bucket.
Definition at line 51 of file FileBucket.cpp.
| FileBucket::FileBucket | ( | FileBucket::Type | type, |
| const std::string | filename | ||
| ) |
Constructor.
Definition at line 57 of file FileBucket.cpp.
| FileBucket::~FileBucket | ( | ) |
destructor
Definition at line 64 of file FileBucket.cpp.
|
privatedelete |
Invalidated default constructor.
|
privatedelete |
Invalidated copy constructor.
| void FileBucket::addElement | ( | const bool | isTemplate | ) |
function related with Elements
add element in bucket
Definition at line 92 of file FileBucket.cpp.
References myNumElements, and myNumTemplates.
Referenced by GNEAttributeCarrier::GNEAttributeCarrier(), and GNEApplicationWindowHelper::FileBucketHandler::registerAC().
| const std::string & FileBucket::getFilename | ( | ) | const |
get filename
Definition at line 74 of file FileBucket.cpp.
References myFilename.
Referenced by GNEAttributeCarrier::getCommonAttribute(), and RouteHandler::parseVType().
| int FileBucket::getNumElements | ( | ) | const |
check number of elements (no templates)
Definition at line 120 of file FileBucket.cpp.
References myNumElements.
| FileBucket::Type FileBucket::getType | ( | ) | const |
| bool FileBucket::isDefaultBucket | ( | ) | const |
check if this is a default bucket
Definition at line 86 of file FileBucket.cpp.
References myDefaultBucket.
| bool FileBucket::isEmpty | ( | ) | const |
check if this bucket is empty
Definition at line 126 of file FileBucket.cpp.
References myNumElements, and myNumTemplates.
|
privatedelete |
Invalidated assignment operator.
| void FileBucket::removeElement | ( | const bool | isTemplate | ) |
remove element
Definition at line 102 of file FileBucket.cpp.
References myNumElements, and myNumTemplates.
Referenced by GNEApplicationWindowHelper::FileBucketHandler::unregisterAC(), GNEApplicationWindowHelper::FileBucketHandler::updateAC(), and GNEAttributeCarrier::~GNEAttributeCarrier().
| void FileBucket::setFilename | ( | const std::string & | filename | ) |
|
private |
flag to indicate if this is a default bucket (it cannot be removed)
Definition at line 111 of file FileBucket.h.
Referenced by isDefaultBucket().
|
private |
filename
Definition at line 102 of file FileBucket.h.
Referenced by getFilename(), and setFilename().
|
private |
|
private |
number of elements vinculated with this file bucket
Definition at line 105 of file FileBucket.h.
Referenced by addElement(), getNumElements(), isEmpty(), and removeElement().
|
private |
number of templates vinculated with this file bucket
Definition at line 108 of file FileBucket.h.
Referenced by addElement(), isEmpty(), and removeElement().
|
static |
vector with all types and prefixes managed in this get bucket handler
Definition at line 41 of file FileBucket.h.
Referenced by GNEApplicationWindowHelper::FileBucketHandler::FileBucketHandler(), GNEApplicationWindowHelper::FileBucketHandler::getConfigDirectory(), and GNEApplicationWindowHelper::FileBucketHandler::getConfigFilePrefix().
|
static |
vector with all types managed in this get bucket handler
Definition at line 28 of file FileBucket.h.
Referenced by GNEApplicationWindowHelper::FileBucketHandler::checkFilename(), GNEApplicationWindowHelper::FileBucketHandler::FileBucketHandler(), GNEApplicationWindowHelper::FileBucketHandler::removeEmptyBuckets(), and GNEApplicationWindowHelper::FileBucketHandler::updateAC().