IbycusId(const IbycusId & rhs)
IbycusId(const IbycusId & rhs, const ibyIdNumber & cit1,
const ibyIdNumber & cit2=ibyIdNumber(),
const ibyIdNumber & cit3=ibyIdNumber(),
const ibyIdNumber & cit4=ibyIdNumber(),
const ibyIdNumber & cit5=ibyIdNumber())
IbycusId(ibyFile & src)
IbycusId(ibyFile & src, const IbycusId & prev)
bool IsTitle() const
Default constructor. Constructs an empty IbycusId
| rhs | An IbycusId on which to base the new one |
Copy constructor. Creates a copy of rhs.
| rhs | An IbycusId on which to base the new one |
| cit1 | An ibyIdNumber to store (required). |
| cit2 | An ibyIdNumber to store (optional). |
| cit3 | An ibyIdNumber to store (optional). |
| cit4 | An ibyIdNumber to store (optional). |
| cit5 | An ibyIdNumber to store (optional). |
This constructor first creates a copy of rhs, then overwrites the ID levels from cit1 to cit5 starting from the "right-hand side", that is, the lowest (z) level first. The following code:
// Open up Vergil (your directory may be different)
IbycusTxtFile txt("LAT0960", "D:\");
txt.Start(0,2) // Go to the start of the Aeneid
IbycusId a = txt.Id();
cout << a << "\n"
IbycusId b(old) // Simple copy constructor
cout << b << "\n"
IbycusId c(b, IbycusIdNumber(2)) // Make the lowest level 2
cout << c << "\n"
// Make the lowest level (line) 100 and the next lowest level (book) 2
IbycusId d(c, IbycusIdNumber(2), IbycusIdNumber(100))
cout << d << "\n"
Produces the following output:
0960.003.1.1 0960.003.1.1 0960.003.1.2 0960.003.2.100
These are equivalent ways of constructing an ID to use with IbycusTxtFile::Goto()
// Open up Vergil (your directory may be different)
IbycusTxtFile txt("LAT0960", "D:\");
IbycusId id;
// Goto Eclogues 1.23
// using only temporaries
txt.Goto(IbycusId(txt.Start(), IbycusIdNumber(23)));
// Goto Georgics 2.34
// Create an id locally and use it to create a temporary
id = txt.Start(0,1,1);
txt.Goto(IbycusId(id, IbycusIdNumber(34)));
// Goto Aeneid 3.456
// Create an id locally and pass it to Goto()
id = IbycusId(txt.Start(0,2,2), IbycusIdNumber(456));
txt.Goto(id);
| src | File from which to read the IbycusId. |
Reads an IbycusId from src.
| rhs | An IbycusId on which to base the new one |
| src | File from which to read the IbycusId. |
Copies IbycusId from rhs and then reads new data from src.
Returns true if the ID represents a title, i.e., if any of its levels is "t".