mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
output statements for ConfigVariableList
This commit is contained in:
parent
87e38e9ff1
commit
62d58d924e
@ -96,3 +96,9 @@ INLINE string ConfigVariableList::
|
|||||||
operator [] (int n) const {
|
operator [] (int n) const {
|
||||||
return get_unique_value(n);
|
return get_unique_value(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
INLINE ostream &
|
||||||
|
operator << (ostream &out, const ConfigVariableList &variable) {
|
||||||
|
variable.output(out);
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
@ -36,3 +36,26 @@ ConfigVariableList(const string &name,
|
|||||||
}
|
}
|
||||||
_core->set_used();
|
_core->set_used();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: ConfigVariableList::output
|
||||||
|
// Access: Published
|
||||||
|
// Description:
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
void ConfigVariableList::
|
||||||
|
output(ostream &out) const {
|
||||||
|
out << get_num_values() << " values.";
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: ConfigVariableList::write
|
||||||
|
// Access: Published
|
||||||
|
// Description:
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
void ConfigVariableList::
|
||||||
|
write(ostream &out) const {
|
||||||
|
int num_values = get_num_values();
|
||||||
|
for (int i = 0; i < num_values; ++i) {
|
||||||
|
out << get_string_value(i) << "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -50,8 +50,13 @@ PUBLISHED:
|
|||||||
|
|
||||||
INLINE int size() const;
|
INLINE int size() const;
|
||||||
INLINE string operator [] (int n) const;
|
INLINE string operator [] (int n) const;
|
||||||
|
|
||||||
|
void output(ostream &out) const;
|
||||||
|
void write(ostream &out) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
INLINE ostream &operator << (ostream &out, const ConfigVariableList &variable);
|
||||||
|
|
||||||
#include "configVariableList.I"
|
#include "configVariableList.I"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user