Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
FileBucket Class Reference

#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::Typeprefixes
 vector with all types and prefixes managed in this get bucket handler
 
static const std::vector< FileBucket::Typetypes
 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.
 
FileBucketoperator= (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
 

Detailed Description

Definition at line 30 of file FileBucket.h.

Member Enumeration Documentation

◆ Type

enum class FileBucket::Type : int
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.

Constructor & Destructor Documentation

◆ FileBucket() [1/4]

FileBucket::FileBucket ( FileBucket::Type  type)

Constructor for default bucket.

Definition at line 51 of file FileBucket.cpp.

◆ FileBucket() [2/4]

FileBucket::FileBucket ( FileBucket::Type  type,
const std::string  filename 
)

Constructor.

Definition at line 57 of file FileBucket.cpp.

◆ ~FileBucket()

FileBucket::~FileBucket ( )

destructor

Definition at line 64 of file FileBucket.cpp.

◆ FileBucket() [3/4]

FileBucket::FileBucket ( )
privatedelete

Invalidated default constructor.

◆ FileBucket() [4/4]

FileBucket::FileBucket ( const FileBucket )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ addElement()

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().

Here is the caller graph for this function:

◆ getFilename()

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().

Here is the caller graph for this function:

◆ getNumElements()

int FileBucket::getNumElements ( ) const

check number of elements (no templates)

Definition at line 120 of file FileBucket.cpp.

References myNumElements.

◆ getType()

FileBucket::Type FileBucket::getType ( ) const

get file type

Definition at line 68 of file FileBucket.cpp.

References myFileType.

◆ isDefaultBucket()

bool FileBucket::isDefaultBucket ( ) const

check if this is a default bucket

Definition at line 86 of file FileBucket.cpp.

References myDefaultBucket.

◆ isEmpty()

bool FileBucket::isEmpty ( ) const

check if this bucket is empty

Definition at line 126 of file FileBucket.cpp.

References myNumElements, and myNumTemplates.

◆ operator=()

FileBucket & FileBucket::operator= ( const FileBucket src)
privatedelete

Invalidated assignment operator.

◆ removeElement()

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().

Here is the caller graph for this function:

◆ setFilename()

void FileBucket::setFilename ( const std::string &  filename)

set filename

Definition at line 80 of file FileBucket.cpp.

References myFilename.

Field Documentation

◆ myDefaultBucket

const bool FileBucket::myDefaultBucket
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().

◆ myFilename

std::string FileBucket::myFilename
private

filename

Definition at line 102 of file FileBucket.h.

Referenced by getFilename(), and setFilename().

◆ myFileType

const FileBucket::Type FileBucket::myFileType
private

type

Definition at line 99 of file FileBucket.h.

Referenced by getType().

◆ myNumElements

int FileBucket::myNumElements = 0
private

number of elements vinculated with this file bucket

Definition at line 105 of file FileBucket.h.

Referenced by addElement(), getNumElements(), isEmpty(), and removeElement().

◆ myNumTemplates

int FileBucket::myNumTemplates = 0
private

number of templates vinculated with this file bucket

Definition at line 108 of file FileBucket.h.

Referenced by addElement(), isEmpty(), and removeElement().

◆ prefixes

◆ types


The documentation for this class was generated from the following files: