Class InitializedList¶
- Defined in File initialized_list.h
Class Documentation¶
-
class
InitializedList¶ Public Functions
-
InitializedList()¶
-
InitializedList(const InitializedList &other)¶ Copy constructor. Only copys the initialized variables set.
- Parameters
other: Object to be copied.
-
InitializedList &
operator=(const InitializedList &other)¶ Assignment operator overload. Needed because of conditionals in the program.
- Return
- Parameters
other: Object used to set the other object.
-
void
add(const std::string &var_name, bool is_field)¶ Adds the specified variable name to the initialized variable list.
- Parameters
var_name: Name of the variable to add
-
bool
exists(const std::string &var_name, bool is_field)¶ Checks whether the specified variable name exists in the initialized variable list.
- Parameters
var_name: Name of the variable to check.
-
std::unordered_set<InitVar>::const_iterator
begin() const¶ Accessor for an iterator to the beginning of the initialized variables.
- Return
- Pointer to the beginning of the initialized variables.
-
std::unordered_set<InitVar>::const_iterator
end() const¶ Accessor for an iterator to the end of the initialized variables.
- Return
- Pointer to the end of the initialized variables.
-
void
var_intersect(const InitializedList &other)¶ Takes the intersection of the initialized variable list.
- Parameters
other: Other initialized list to take in the intersection
-
const std::unordered_set<InitVar>
all_items() const¶ Accessor for all initialized variables.
- Return
- Initialized variable set.
-
void
var_union(const InitializedList &other)¶ Takes the intersection of the initialized variable list.
- Parameters
other: Other initialized list to take in the intersection
-
unsigned
count()¶ Accessor for the number of variables in the initialized list.
- Return
- Initialized list count.
Friends
-
friend
InitializedList::Quack::TypeChecker
-